diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-07 23:36:57 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-07 23:36:57 +0200 |
commit | dc0755cdb16cb129c4054c85d62bce83a18bcbcf (patch) | |
tree | 17f585ce18524ec029cb1169cdba256c83288101 /fs/nfs/dir.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebi... (diff) | |
parent | constify dcache.c inlined helpers where possible (diff) | |
download | linux-dc0755cdb16cb129c4054c85d62bce83a18bcbcf.tar.xz linux-dc0755cdb16cb129c4054c85d62bce83a18bcbcf.zip |
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/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e474ca2b2bfe..7468735d299e 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1135,14 +1135,13 @@ out_zap_parent: if (inode && S_ISDIR(inode->i_mode)) { /* Purge readdir caches. */ nfs_zap_caches(inode); - /* If we have submounts, don't unhash ! */ - if (have_submounts(dentry)) - goto out_valid; if (dentry->d_flags & DCACHE_DISCONNECTED) goto out_valid; - shrink_dcache_parent(dentry); } - d_drop(dentry); + /* If we have submounts, don't unhash ! */ + if (check_submounts_and_drop(dentry) != 0) + goto out_valid; + dput(parent); dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", __func__, dentry->d_parent->d_name.name, |