[Devel,vz7,32/46] fuse: abort: group pqueue accesses

Submitted by Maxim Patlasov on March 25, 2017, 2:25 a.m.

Details

Message ID 149040870424.25341.8864413324607943839.stgit@maxim-thinkpad
State New
Series "fuse: add multi-threading support"
Headers show

Commit Message

Maxim Patlasov March 25, 2017, 2:25 a.m.
Backport from ml:

commit 24b4d33d46e9c4c671a43f2640d80fe1159f488c
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Wed Jul 1 16:26:05 2015 +0200

    fuse: abort: group pqueue accesses

    Rearrange fuse_abort_conn() so that processing queue accesses are grouped
    together.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Reviewed-by: Ashish Samant <ashish.samant@oracle.com>

Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
---
 fs/fuse/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 3659da7..0191c17 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -2133,6 +2133,7 @@  void fuse_abort_conn(struct fuse_conn *fc)
 				list_move(&req->list, &to_end1);
 			spin_unlock(&req->waitq.lock);
 		}
+		list_splice_init(&fpq->processing, &to_end2);
 		fc->max_background = UINT_MAX;
 		flush_bg_queue(fc);
 
@@ -2145,7 +2146,6 @@  void fuse_abort_conn(struct fuse_conn *fc)
 		spin_unlock(&fiq->waitq.lock);
 		kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
 
-		list_splice_init(&fpq->processing, &to_end2);
 		while (!list_empty(&to_end1)) {
 			req = list_first_entry(&to_end1, struct fuse_req, list);
 			__fuse_get_request(req);