summaryrefslogtreecommitdiff
path: root/fs/9p/vfs_dentry.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-02-28 01:13:19 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-28 01:13:19 -0500
commitaaeb7ecfb48ad4c8942a26874322d8918524a04f (patch)
treeae2e0dbd1cb3a199e9fd92786a0da2ba810a42ef /fs/9p/vfs_dentry.c
parentc4d30967f3020cda9df9ee22af79cd1f2c284244 (diff)
v9fs: get rid of v9fs_dentry
->d_fsdata can act as hlist_head... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/vfs_dentry.c')
-rw-r--r--fs/9p/vfs_dentry.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index fcd49833ef80..f039b104a98e 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -83,18 +83,12 @@ static int v9fs_cached_dentry_delete(const struct dentry *dentry)
static void v9fs_dentry_release(struct dentry *dentry)
{
- struct v9fs_dentry *dent;
+ struct hlist_node *p, *n;
p9_debug(P9_DEBUG_VFS, " dentry: %s (%p)\n",
dentry->d_name.name, dentry);
- dent = dentry->d_fsdata;
- if (dent) {
- struct hlist_node *p, *n;
- hlist_for_each_safe(p, n, &dent->fidlist)
- p9_client_clunk(hlist_entry(p, struct p9_fid, dlist));
-
- kfree(dent);
- dentry->d_fsdata = NULL;
- }
+ hlist_for_each_safe(p, n, (struct hlist_head *)&dentry->d_fsdata)
+ p9_client_clunk(hlist_entry(p, struct p9_fid, dlist));
+ dentry->d_fsdata = NULL;
}
static int v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)