Skip to content

Commit 4fa6af5

Browse files
committed
nfsd: avoid pointless cred reference count bump
The code already got rid of the extra reference count from the old version of override_creds(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Chuck Lever <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 76a4008 commit 4fa6af5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/nfsd/auth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ int nfsd_setuser(struct svc_cred *cred, struct svc_export *exp)
7979
else
8080
new->cap_effective = cap_raise_nfsd_set(new->cap_effective,
8181
new->cap_permitted);
82-
put_cred(override_creds(get_new_cred(new)));
83-
put_cred(new);
82+
put_cred(override_creds(new));
8483
return 0;
8584

8685
oom:

0 commit comments

Comments
 (0)