From 17cadc95372e28024be0874e67329c1862912c5d Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Thu, 27 Sep 2007 10:07:31 -0400 Subject: NFS: Don't force a dcache revalidation if nfs_wcc_update_inode succeeds The reason is that if the weak cache consistency update was successful, then we know that our client must be the only one that changed the directory, and we've already updated the dcache to reflect the change. Signed-off-by: Trond Myklebust --- include/linux/nfs_fs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f45161363be..fd2c5c8158c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -235,8 +235,10 @@ static inline void nfs_mark_for_revalidate(struct inode *inode) spin_lock(&inode->i_lock); nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS; - if (S_ISDIR(inode->i_mode)) + if (S_ISDIR(inode->i_mode)) { nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; + nfsi->cache_change_attribute = jiffies; + } spin_unlock(&inode->i_lock); } -- cgit v1.2.3-70-g09d2