Skip to content

Commit

Permalink
fuse: use list_for_each_entry() for list traversing
Browse files Browse the repository at this point in the history
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Dong Fang authored and Miklos Szeredi committed Sep 4, 2013
1 parent efeb9e6 commit 05726ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 05726ac

Please sign in to comment.