summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-05-30 19:39:02 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-10-09 10:38:59 +0400
commit2926620145095ffb0350b2312ac9d0af8537796f (patch)
treea8960531afd289f1be0705c5cf27c240e4510a51 /fs/dcache.c
parent29355c3904e1765948c7721719a028b7eb5dfe1d (diff)
downloadlinux-2926620145095ffb0350b2312ac9d0af8537796f.tar.xz
dcache.c: call ->d_prune() regardless of d_unhashed()
the only in-tree instance checks d_unhashed() anyway, out-of-tree code can preserve the current behaviour by adding such check if they want it and we get an ability to use it in cases where we *want* to be notified of killing being inevitable before ->d_lock is dropped, whether it's unhashed or not. In particular, autofs would benefit from that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index d8a77b1c3d52..21eee4c08e76 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -482,7 +482,7 @@ static void __dentry_kill(struct dentry *dentry)
* inform the fs via d_prune that this dentry is about to be
* unhashed and destroyed.
*/
- if ((dentry->d_flags & DCACHE_OP_PRUNE) && !d_unhashed(dentry))
+ if (dentry->d_flags & DCACHE_OP_PRUNE)
dentry->d_op->d_prune(dentry);
if (dentry->d_flags & DCACHE_LRU_LIST) {