From 9a206de2ea878f4502e86b81c0d7eb9b651bde82 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sun, 26 Jan 2020 17:31:14 -0500 Subject: [PATCH] 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 Signed-off-by: Anna Schumaker --- fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0