Skip to content

Commit 81be9a8

Browse files
committed
nfsfh: 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 dfce6a4 commit 81be9a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/nfsd/nfsfh.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct net *net,
221221
new->cap_effective =
222222
cap_raise_nfsd_set(new->cap_effective,
223223
new->cap_permitted);
224-
put_cred(override_creds(get_new_cred(new)));
225-
put_cred(new);
224+
put_cred(override_creds(new));
226225
} else {
227226
error = nfsd_setuser_and_check_port(rqstp, cred, exp);
228227
if (error)

0 commit comments

Comments
 (0)