diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-27 22:51:08 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-27 22:51:08 -0500 |
commit | c4d30967f3020cda9df9ee22af79cd1f2c284244 (patch) | |
tree | 744565daf8f1d711c0186c3261ebf42eebe1a44e /fs/9p/fid.c | |
parent | 634095dab2a2001844fc8b26673c0cb14a766cdf (diff) |
9p: turn fid->dlist into hlist
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/fid.c')
-rw-r--r-- | fs/9p/fid.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 71bc36a03e72..49de4264db9a 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -54,12 +54,12 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) if (!dent) return -ENOMEM; - INIT_LIST_HEAD(&dent->fidlist); + INIT_HLIST_HEAD(&dent->fidlist); dentry->d_fsdata = dent; } spin_lock(&dentry->d_lock); - list_add(&fid->dlist, &dent->fidlist); + hlist_add_head(&fid->dlist, &dent->fidlist); spin_unlock(&dentry->d_lock); return 0; @@ -84,8 +84,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) dent = (struct v9fs_dentry *) dentry->d_fsdata; ret = NULL; if (dent) { + struct hlist_node *n; spin_lock(&dentry->d_lock); - list_for_each_entry(fid, &dent->fidlist, dlist) { + hlist_for_each_entry(fid, n, &dent->fidlist, dlist) { if (any || uid_eq(fid->uid, uid)) { ret = fid; break; |