Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ecc5e8fcad7ad64d68c098249359831331bd299
Commit:     6ecc5e8fcad7ad64d68c098249359831331bd299
Parent:     7957c1418f4b6c66e28d4ac3c4d7a8c19d526c48
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 28 14:20:33 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:18:49 2007 -0400

    NFS: Fix dcache revalidation bugs
    
    We don't need to force a dentry lookup just because we're making changes to
    the directory.
    
    Don't update nfsi->cache_change_attribute in nfs_end_data_update: that
    overrides the NFSv3/v4 weak consistency checking that tells us our update
    was the only one, and that tells us the dcache is still valid.
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/dir.c   |   10 +++-------
 fs/nfs/inode.c |    1 -
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2b5e611..6518b09 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -650,15 +650,11 @@ static int nfs_fsync_dir(struct file *filp, struct dentry 
*dentry, int datasync)
  */
 static int nfs_check_verifier(struct inode *dir, struct dentry *dentry)
 {
-       unsigned long verf;
-
        if (IS_ROOT(dentry))
                return 1;
-       verf = dentry->d_time;
-       if (nfs_caches_unstable(dir)
-                       || verf != NFS_I(dir)->cache_change_attribute)
-               return 0;
-       return 1;
+       if (dentry->d_time == NFS_I(dir)->cache_change_attribute)
+               return 1;
+       return 0;
 }
 
 static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index ed035a8..cca1ab2 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -785,7 +785,6 @@ void nfs_end_data_update(struct inode *inode)
                nfsi->cache_validity |= NFS_INO_INVALID_DATA;
                spin_unlock(&inode->i_lock);
        }
-       nfsi->cache_change_attribute = jiffies;
        atomic_dec(&nfsi->data_updates);
 }
 
-
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