diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-12-17 15:36:55 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2022-01-06 14:00:20 -0500 |
commit | 98ca3ee60b9e4b039cc3ef21a169e775afa9bd0c (patch) | |
tree | 78a6918619b8150d5c2c3ecb6489433b35616cf9 | |
parent | 1ab5be4ac5b1c9ce39ce1037c45b68d2ce6eede0 (diff) | |
download | linux-98ca3ee60b9e4b039cc3ef21a169e775afa9bd0c.tar.bz2 |
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>
-rw-r--r-- | fs/nfs/dir.c | 3 |
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); } |