From: Trond Myklebust Date: Sun, 30 Sep 2007 21:03:25 +0000 (-0400) Subject: NFS: nfs_wcc_update_inode: directory caches are always invalidated X-Git-Tag: v2.6.24-rc1~1285^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e323ea46d95d7f8c789effd1194dfc120284dbbd;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git NFS: nfs_wcc_update_inode: directory caches are always invalidated We must ensure that the readdir data is always invalidated whether or not the weak cache consistency data update succeeds. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index cca1ab2..f1f6639 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -801,6 +801,8 @@ static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) } if (timespec_equal(&inode->i_mtime, &fattr->pre_mtime)) { memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); + if (S_ISDIR(inode->i_mode)) + nfsi->cache_validity |= NFS_INO_INVALID_DATA; nfsi->cache_change_attribute = now; } if (inode->i_size == fattr->pre_size && nfsi->npages == 0) {