summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:54 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:54 -0500
commit15860ab1d7700249ebe3b0b8ca86ce43dfd0d66f (patch)
treea4ca20956b2dec71d1d2f269f36160fdcc5d6618
parent5584c30630f8a4aac557093b1603e166fe7385be (diff)
NFSv4: Ensure that we set the verifier when revalidating delegated dentries
This ensures that we don't have to look up the dentry again after we return the delegation if we know that the directory didn't change. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 121b533f1f2..ff167aa6243 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -799,6 +799,9 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd)
goto out_bad;
}
+ if (nfs_have_delegation(inode, FMODE_READ))
+ goto out_set_verifier;
+
/* Force a full look up iff the parent directory has changed */
if (!nfs_is_exclusive_create(dir, nd) && nfs_check_verifier(dir, dentry)) {
if (nfs_lookup_verify_inode(inode, nd))
@@ -817,6 +820,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd)
if ((error = nfs_refresh_inode(inode, &fattr)) != 0)
goto out_bad;
+out_set_verifier:
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
out_valid:
dput(parent);
@@ -1084,8 +1088,6 @@ out:
no_open_dput:
dput(parent);
no_open:
- if (inode != NULL && nfs_have_delegation(inode, FMODE_READ))
- return 1;
return nfs_lookup_revalidate(dentry, nd);
}
#endif /* CONFIG_NFSV4 */