diff options
-rw-r--r-- | fs/afs/dir.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 34494fbead0a..0b74d3176ab7 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -685,16 +685,12 @@ not_found: spin_unlock(&dentry->d_lock); out_bad: - if (dentry->d_inode) { - /* don't unhash if we have submounts */ - if (have_submounts(dentry)) - goto out_skip; - } + /* don't unhash if we have submounts */ + if (check_submounts_and_drop(dentry) != 0) + goto out_skip; _debug("dropping dentry %s/%s", parent->d_name.name, dentry->d_name.name); - shrink_dcache_parent(dentry); - d_drop(dentry); dput(parent); key_put(key); |