fuse: use list_for_each_entry() for list traversing
authorDong Fang <yp.fangdong@gmail.com>
Wed, 31 Jul 2013 02:50:01 +0000 (22:50 -0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 4 Sep 2013 15:42:42 +0000 (17:42 +0200)
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/dev.c

index 1d55f94654000dbc8e8c0de37e0cb32471e3791a..ef74ad5fd362b193d858fdd2cfe3335d951d2a99 100644 (file)
@@ -1765,11 +1765,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;
        }