aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-09-27 10:07:31 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:18:55 -0400
commit17cadc95372e28024be0874e67329c1862912c5d (patch)
tree0785ba140643d87c23e7bca67d1f2522214a0d12 /fs/nfs/nfs4proc.c
parente323ea46d95d7f8c789effd1194dfc120284dbbd (diff)
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 <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0e366a31f63b..871c102d9bdf 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -208,9 +208,12 @@ static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo)
208 struct nfs_inode *nfsi = NFS_I(dir); 208 struct nfs_inode *nfsi = NFS_I(dir);
209 209
210 spin_lock(&dir->i_lock); 210 spin_lock(&dir->i_lock);
211 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; 211 if (cinfo->after != nfsi->change_attr) {
212 if (cinfo->before == nfsi->change_attr && cinfo->atomic) 212 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA;
213 if (!cinfo->atomic || cinfo->before != nfsi->change_attr)
214 nfsi->cache_change_attribute = jiffies;
213 nfsi->change_attr = cinfo->after; 215 nfsi->change_attr = cinfo->after;
216 }
214 spin_unlock(&dir->i_lock); 217 spin_unlock(&dir->i_lock);
215} 218}
216 219