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/20241125-work-cred-v2-16-68b9d38bb5b2@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner 2024-11-25 15:10:12 +01:00
parent dfce6a462a
commit 81be9a8a10
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -221,8 +221,7 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct net *net,
new->cap_effective =
cap_raise_nfsd_set(new->cap_effective,
new->cap_permitted);
put_cred(override_creds(get_new_cred(new)));
put_cred(new);
put_cred(override_creds(new));
} else {
error = nfsd_setuser_and_check_port(rqstp, cred, exp);
if (error)