Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b841736bc16b320bcdb1e8ece585b3ced9a8811
Commit:     4b841736bc16b320bcdb1e8ece585b3ced9a8811
Parent:     8edb01828837302055a8f0afddb2256659480bc5
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Sat Sep 29 17:15:01 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:19:20 2007 -0400

    NFS: Fix nfs_verify_change_attribute()
    
    We don't care about whether or not some other process on our client is
    changing the directory while we're in nfs_lookup_revalidate(), because the
    dcache will take care of ensuring local atomicity.
    We can therefore remove the test for nfs_caches_unstable().
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/dir.c           |    2 +-
 include/linux/nfs_fs.h |   14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 07df192..e275a6e 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -646,7 +646,7 @@ static int nfs_check_verifier(struct inode *dir, struct 
dentry *dentry)
 {
        if (IS_ROOT(dentry))
                return 1;
-       if (dentry->d_time == NFS_I(dir)->cache_change_attribute)
+       if (nfs_verify_change_attribute(dir, dentry->d_time))
                return 1;
        return 0;
 }
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index a765dd4..0197b12 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -270,16 +270,16 @@ static inline unsigned long 
nfs_save_change_attribute(struct inode *dir)
 }
 
 /**
- * nfs_verify_change_attribute - Detects NFS inode cache updates
- * @inode - pointer to inode
+ * nfs_verify_change_attribute - Detects NFS remote directory changes
+ * @dir - pointer to parent directory inode
  * @chattr - previously saved change attribute
- * Return "false" if metadata has been updated (or is in the process of
- * being updated) since the change attribute was saved.
+ * Return "false" if the verifiers doesn't match the change attribute.
+ * This would usually indicate that the directory contents have changed on
+ * the server, and that any dentries need revalidating.
  */
-static inline int nfs_verify_change_attribute(struct inode *inode, unsigned 
long chattr)
+static inline int nfs_verify_change_attribute(struct inode *dir, unsigned long 
chattr)
 {
-       return !nfs_caches_unstable(inode)
-               && chattr == NFS_I(inode)->cache_change_attribute;
+       return chattr == NFS_I(dir)->cache_change_attribute;
 }
 
 /*
-
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