aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-09-28 14:20:33 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:18:49 -0400
commit6ecc5e8fcad7ad64d68c098249359831331bd299 (patch)
treea0880db55be695d2975eb2d993d4cc918d0d3d83 /fs/nfs/dir.c
parent7957c1418f4b6c66e28d4ac3c4d7a8c19d526c48 (diff)
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 <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2b5e611352c5..6518b098e625 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)
650 */ 650 */
651static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) 651static int nfs_check_verifier(struct inode *dir, struct dentry *dentry)
652{ 652{
653 unsigned long verf;
654
655 if (IS_ROOT(dentry)) 653 if (IS_ROOT(dentry))
656 return 1; 654 return 1;
657 verf = dentry->d_time; 655 if (dentry->d_time == NFS_I(dir)->cache_change_attribute)
658 if (nfs_caches_unstable(dir) 656 return 1;
659 || verf != NFS_I(dir)->cache_change_attribute) 657 return 0;
660 return 0;
661 return 1;
662} 658}
663 659
664static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) 660static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf)