[Devel,vz7,27/46] fuse: use list_for_each_entry() for list traversing

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

Details

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

Commit Message

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

commit 05726acabef10faffcbc400c109ddb6c9d7560e4
Author: Dong Fang <yp.fangdong@gmail.com>
Date:   Tue Jul 30 22:50:01 2013 -0400

    fuse: use list_for_each_entry() for list traversing

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

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

Patch hide | download patch | download mbox

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 10c126b..09110d4 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1813,11 +1813,9 @@  static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
 /* Look up request on processing list by unique ID */
 static struct fuse_req *request_find(struct fuse_conn *fc, u64 unique)
 {
-	struct list_head *entry;
+	struct fuse_req *req;
 
-	list_for_each(entry, &fc->processing) {
-		struct fuse_req *req;
-		req = list_entry(entry, struct fuse_req, list);
+	list_for_each_entry(req, &fc->processing, list) {
 		if (req->in.h.unique == unique || req->intr_unique == unique)
 			return req;
 	}