Skip to content

Commit dfce6a4

Browse files
committed
nfs/nfs4recover: 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 3e23a1c commit dfce6a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/nfsd/nfs4recover.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ nfs4_save_creds(const struct cred **original_creds)
8181

8282
new->fsuid = GLOBAL_ROOT_UID;
8383
new->fsgid = GLOBAL_ROOT_GID;
84-
*original_creds = override_creds(get_new_cred(new));
85-
put_cred(new);
84+
*original_creds = override_creds(new);
8685
return 0;
8786
}
8887

0 commit comments

Comments
 (0)