Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf8ba45e0554f1c8838fcfe43a93114f177af839
Commit:     cf8ba45e0554f1c8838fcfe43a93114f177af839
Parent:     f38211100d4823be530577dc3452f838861222ec
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 1 13:46:53 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:19:42 2007 -0400

    NFS: don't cache the verifer across ->lookup() calls
    
    If the ->lookup() call causes the directory verifier to change, then there
    is still no need to use the old verifier, since our dentry has been
    verified.
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/dir.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d58bfb8..7cd2697 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -735,7 +735,6 @@ static int nfs_lookup_revalidate(struct dentry * dentry, 
struct nameidata *nd)
        int error;
        struct nfs_fh fhandle;
        struct nfs_fattr fattr;
-       unsigned long verifier;
 
        parent = dget_parent(dentry);
        lock_kernel();
@@ -770,7 +769,6 @@ static int nfs_lookup_revalidate(struct dentry * dentry, 
struct nameidata *nd)
        if (NFS_STALE(inode))
                goto out_bad;
 
-       verifier = nfs_save_change_attribute(dir);
        error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr);
        if (error)
                goto out_bad;
@@ -779,7 +777,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, 
struct nameidata *nd)
        if ((error = nfs_refresh_inode(inode, &fattr)) != 0)
                goto out_bad;
 
-       nfs_set_verifier(dentry, verifier);
+       nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
  out_valid:
        unlock_kernel();
        dput(parent);
@@ -1048,7 +1046,6 @@ static int nfs_open_revalidate(struct dentry *dentry, 
struct nameidata *nd)
        struct dentry *parent = NULL;
        struct inode *inode = dentry->d_inode;
        struct inode *dir;
-       unsigned long verifier;
        int openflags, ret = 0;
 
        parent = dget_parent(dentry);
@@ -1076,10 +1073,9 @@ static int nfs_open_revalidate(struct dentry *dentry, 
struct nameidata *nd)
         * change attribute *before* we do the RPC call.
         */
        lock_kernel();
-       verifier = nfs_save_change_attribute(dir);
        ret = nfs4_open_revalidate(dir, dentry, openflags, nd);
        if (ret == 1)
-               nfs_set_verifier(dentry, verifier);
+               nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
        unlock_kernel();
 out:
        dput(parent);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to