summaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-09-28 12:37:05 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-10-03 20:49:07 -0400
commit2929bc3329f4c7e4df400acca2b1844492650bfd (patch)
tree3b0bdce8d33627ed50a98f0cbe59055141344192 /fs/nfs/dir.c
parenta6a361c4ca3cc3e6f3b39d1b6bca1de90f5f4b11 (diff)
NFS: Fix up nfs_readdir_inode_mapping_valid()
The check for duplicate readdir cookies should only care if the change attribute is invalid or the data cache is invalid. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Tested-by: Benjamin Coddington <bcodding@redhat.com> Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index f2df664db020..fa4d33687d2b 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -411,7 +411,8 @@ out_eof:
static bool
nfs_readdir_inode_mapping_valid(struct nfs_inode *nfsi)
{
- if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA))
+ if (nfsi->cache_validity & (NFS_INO_INVALID_CHANGE |
+ NFS_INO_INVALID_DATA))
return false;
smp_rmb();
return !test_bit(NFS_INO_INVALIDATING, &nfsi->flags);