aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-12-17 15:36:55 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2022-01-06 14:00:20 -0500
commit98ca3ee60b9e4b039cc3ef21a169e775afa9bd0c (patch)
tree78a6918619b8150d5c2c3ecb6489433b35616cf9 /fs/nfs/dir.c
parentNFSv4: Add some support for case insensitive filesystems (diff)
downloadlinux-dev-98ca3ee60b9e4b039cc3ef21a169e775afa9bd0c.tar.xz
linux-dev-98ca3ee60b9e4b039cc3ef21a169e775afa9bd0c.zip
NFSv4: Just don't cache negative dentries on case insensitive servers
If the directory contents change, we cannot rely on the negative dentry being cacheable. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 9883f72fdb6f..7ebfe4e3cf85 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1436,6 +1436,9 @@ int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,
return 0;
if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG)
return 1;
+ /* Case insensitive server? Revalidate negative dentries */
+ if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE))
+ return 1;
return !nfs_check_verifier(dir, dentry, flags & LOOKUP_RCU);
}