Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
75f3ee4c
Commit
75f3ee4c
authored
Jul 26, 2018
by
Miklos Szeredi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: simplify fuse_abort_conn()
Signed-off-by:
Miklos Szeredi
<
mszeredi@redhat.com
>
parent
109728cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
fs/fuse/dev.c
fs/fuse/dev.c
+6
-12
No files found.
fs/fuse/dev.c
View file @
75f3ee4c
...
...
@@ -2101,8 +2101,7 @@ void fuse_abort_conn(struct fuse_conn *fc, bool is_abort)
if
(
fc
->
connected
)
{
struct
fuse_dev
*
fud
;
struct
fuse_req
*
req
,
*
next
;
LIST_HEAD
(
to_end1
);
LIST_HEAD
(
to_end2
);
LIST_HEAD
(
to_end
);
fc
->
connected
=
0
;
fc
->
blocked
=
0
;
...
...
@@ -2120,11 +2119,11 @@ void fuse_abort_conn(struct fuse_conn *fc, bool is_abort)
if
(
!
test_bit
(
FR_LOCKED
,
&
req
->
flags
))
{
set_bit
(
FR_PRIVATE
,
&
req
->
flags
);
__fuse_get_request
(
req
);
list_move
(
&
req
->
list
,
&
to_end
1
);
list_move
(
&
req
->
list
,
&
to_end
);
}
spin_unlock
(
&
req
->
waitq
.
lock
);
}
list_splice_
init
(
&
fpq
->
processing
,
&
to_end2
);
list_splice_
tail_init
(
&
fpq
->
processing
,
&
to_end
);
spin_unlock
(
&
fpq
->
lock
);
}
fc
->
max_background
=
UINT_MAX
;
...
...
@@ -2132,9 +2131,9 @@ void fuse_abort_conn(struct fuse_conn *fc, bool is_abort)
spin_lock
(
&
fiq
->
waitq
.
lock
);
fiq
->
connected
=
0
;
list_splice_init
(
&
fiq
->
pending
,
&
to_end2
);
list_for_each_entry
(
req
,
&
to_end2
,
list
)
list_for_each_entry
(
req
,
&
fiq
->
pending
,
list
)
clear_bit
(
FR_PENDING
,
&
req
->
flags
);
list_splice_tail_init
(
&
fiq
->
pending
,
&
to_end
);
while
(
forget_pending
(
fiq
))
kfree
(
dequeue_forget
(
fiq
,
1
,
NULL
));
wake_up_all_locked
(
&
fiq
->
waitq
);
...
...
@@ -2144,12 +2143,7 @@ void fuse_abort_conn(struct fuse_conn *fc, bool is_abort)
wake_up_all
(
&
fc
->
blocked_waitq
);
spin_unlock
(
&
fc
->
lock
);
while
(
!
list_empty
(
&
to_end1
))
{
req
=
list_first_entry
(
&
to_end1
,
struct
fuse_req
,
list
);
list_del_init
(
&
req
->
list
);
request_end
(
fc
,
req
);
}
end_requests
(
fc
,
&
to_end2
);
end_requests
(
fc
,
&
to_end
);
}
else
{
spin_unlock
(
&
fc
->
lock
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment