diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-09-30 17:03:25 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:18:51 -0400 |
commit | e323ea46d95d7f8c789effd1194dfc120284dbbd (patch) | |
tree | c88ffaef5f6a6bd50a853c6acc234795a17de5ac /fs/nfs/inode.c | |
parent | 6ecc5e8fcad7ad64d68c098249359831331bd299 (diff) | |
download | linux-e323ea46d95d7f8c789effd1194dfc120284dbbd.tar.bz2 |
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 <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index cca1ab2922bf..f1f6639f52b5 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) { |