diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-08 01:36:57 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-08 01:36:57 +0400 |
commit | dc0755cdb16cb129c4054c85d62bce83a18bcbcf (patch) | |
tree | 17f585ce18524ec029cb1169cdba256c83288101 /fs/afs/dir.c | |
parent | c7c4591db64dbd1e504bc4e2806d7ef290a3c81b (diff) | |
parent | f0d3b3ded999daae1cf451d051018038c0a05bae (diff) | |
download | linux-dc0755cdb16cb129c4054c85d62bce83a18bcbcf.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile 2 (of many) from Al Viro:
"Mostly Miklos' series this time"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
constify dcache.c inlined helpers where possible
fuse: drop dentry on failed revalidate
fuse: clean up return in fuse_dentry_revalidate()
fuse: use d_materialise_unique()
sysfs: use check_submounts_and_drop()
nfs: use check_submounts_and_drop()
gfs2: use check_submounts_and_drop()
afs: use check_submounts_and_drop()
vfs: check unlinked ancestors before mount
vfs: check submounts and drop atomically
vfs: add d_walk()
vfs: restructure d_genocide()
Diffstat (limited to 'fs/afs/dir.c')
-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); |