From: Trond Myklebust Date: Sun, 26 Jan 2020 22:31:14 +0000 (-0500) Subject: NFS: nfs_access_get_cached_rcu() should use cred_fscmp() X-Git-Tag: v5.6-rc1~29^2~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9a206de2ea878f4502e86b81c0d7eb9b651bde82;p=users%2Fjedix%2Flinux-maple.git 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 --- 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;