[Devel,vz7,22/46] fuse: dev read: split list_move

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

Details

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

Commit Message

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

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

    fuse: dev read: split list_move

    Different lists will need different locks.

    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 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 7c03d38..1349fb3 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1253,7 +1253,8 @@  static ssize_t fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
 
 	req = list_entry(fiq->pending.next, struct fuse_req, list);
 	clear_bit(FR_PENDING, &req->flags);
-	list_move(&req->list, &fc->io);
+	list_del_init(&req->list);
+	list_add(&req->list, &fc->io);
 
 	in = &req->in;
 	reqsize = in->h.len;