mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
SUNRPC: remove pointless test in unx_match()
As reported by Dan Carpenter, this test for acred->cred being set is inconsistent with the dereference of the pointer a few lines earlier. An 'auth_cred' *always* has ->cred set - every place that creates one initializes this field, often as the first thing done. So remove this test. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
45bb8d8027
commit
e3735c8998
@ -87,7 +87,7 @@ unx_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
|
||||
if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred->fsgid))
|
||||
return 0;
|
||||
|
||||
if (acred->cred && acred->cred->group_info != NULL)
|
||||
if (acred->cred->group_info != NULL)
|
||||
groups = acred->cred->group_info->ngroups;
|
||||
if (groups > UNX_NGROUPS)
|
||||
groups = UNX_NGROUPS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user