aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2020-01-26 17:31:14 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-02-03 16:35:07 -0500
commit9a206de2ea878f4502e86b81c0d7eb9b651bde82 (patch)
treedfcd2a750d3235bc407e08e02d2a221c6ec3e2bf
parentNFSv4: pnfs_roc() must use cred_fscmp() to compare creds (diff)
downloadlinux-dev-9a206de2ea878f4502e86b81c0d7eb9b651bde82.tar.xz
linux-dev-9a206de2ea878f4502e86b81c0d7eb9b651bde82.zip
NFS: nfs_access_get_cached_rcu() should use cred_fscmp()
We do not need to have the rcu lookup method fail in the case where the fsuid/fsgid and supplemental groups match. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index bfc66f3f00e1..6427a8a8d61a 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2360,7 +2360,7 @@ static int nfs_access_get_cached_rcu(struct inode *inode, const struct cred *cre
lh = rcu_dereference(nfsi->access_cache_entry_lru.prev);
cache = list_entry(lh, struct nfs_access_entry, lru);
if (lh == &nfsi->access_cache_entry_lru ||
- cred != cache->cred)
+ cred_fscmp(cred, cache->cred) != 0)
cache = NULL;
if (cache == NULL)
goto out;