]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/9p/vfs_dentry.c
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[karo-tx-linux.git] / fs / 9p / vfs_dentry.c
index fcd49833ef80179800dedb718ca8dbefd4f3a97a..f039b104a98e9093cadfb62b040a604628a76b7a 100644 (file)
@@ -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)