Commit 98ca3ee6 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 1ab5be4a
...@@ -1436,6 +1436,9 @@ int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry, ...@@ -1436,6 +1436,9 @@ int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,
return 0; return 0;
if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG)
return 1; 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); return !nfs_check_verifier(dir, dentry, flags & LOOKUP_RCU);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment