summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-07-01 10:26:02 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2015-07-01 10:26:02 -0400
commit8c91189a2a8f5e69457bea9f48350c48310cec5b (patch)
tree02ccd38f0210037a45fa4f1e37b5b83a9bfe8fd1 /fs/fuse
parente16714d8756dc1237a66994e139b61feebcf707a (diff)
fuse: abort: group iqueue accesses
Rearrange fuse_abort_conn() so that input queue accesses are grouped together. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/dev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index a24ead993650..deafbdf278c6 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -2127,7 +2127,6 @@ void fuse_abort_conn(struct fuse_conn *fc)
2127 LIST_HEAD(to_end2); 2127 LIST_HEAD(to_end2);
2128 2128
2129 fc->connected = 0; 2129 fc->connected = 0;
2130 fiq->connected = 0;
2131 fc->blocked = 0; 2130 fc->blocked = 0;
2132 fuse_set_initialized(fc); 2131 fuse_set_initialized(fc);
2133 list_for_each_entry_safe(req, next, &fc->io, list) { 2132 list_for_each_entry_safe(req, next, &fc->io, list) {
@@ -2140,7 +2139,14 @@ void fuse_abort_conn(struct fuse_conn *fc)
2140 } 2139 }
2141 fc->max_background = UINT_MAX; 2140 fc->max_background = UINT_MAX;
2142 flush_bg_queue(fc); 2141 flush_bg_queue(fc);
2142
2143 fiq->connected = 0;
2143 list_splice_init(&fiq->pending, &to_end2); 2144 list_splice_init(&fiq->pending, &to_end2);
2145 while (forget_pending(fiq))
2146 kfree(dequeue_forget(fiq, 1, NULL));
2147 wake_up_all(&fiq->waitq);
2148 kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
2149
2144 list_splice_init(&fc->processing, &to_end2); 2150 list_splice_init(&fc->processing, &to_end2);
2145 while (!list_empty(&to_end1)) { 2151 while (!list_empty(&to_end1)) {
2146 req = list_first_entry(&to_end1, struct fuse_req, list); 2152 req = list_first_entry(&to_end1, struct fuse_req, list);
@@ -2149,12 +2155,8 @@ void fuse_abort_conn(struct fuse_conn *fc)
2149 spin_lock(&fc->lock); 2155 spin_lock(&fc->lock);
2150 } 2156 }
2151 end_requests(fc, &to_end2); 2157 end_requests(fc, &to_end2);
2152 while (forget_pending(fiq))
2153 kfree(dequeue_forget(fiq, 1, NULL));
2154 end_polls(fc); 2158 end_polls(fc);
2155 wake_up_all(&fiq->waitq);
2156 wake_up_all(&fc->blocked_waitq); 2159 wake_up_all(&fc->blocked_waitq);
2157 kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
2158 } 2160 }
2159 spin_unlock(&fc->lock); 2161 spin_unlock(&fc->lock);
2160} 2162}