Skip to content

Commit 6077c46

Browse files
committed
cifs: avoid pointless cred reference count bump
During module init spnego_cred will be allocated with its own reference which is only destroyed during module exit. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jeff Layton <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent facc239 commit 6077c46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/smb/client/cifs_spnego.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
173173
}
174174

175175
cifs_dbg(FYI, "key description = %s\n", description);
176-
saved_cred = override_creds(get_new_cred(spnego_cred));
176+
saved_cred = override_creds(spnego_cred);
177177
spnego_key = request_key(&cifs_spnego_key_type, description, "");
178-
put_cred(revert_creds(saved_cred));
178+
revert_creds(saved_cred);
179179

180180
#ifdef CONFIG_CIFS_DEBUG2
181181
if (cifsFYI && !IS_ERR(spnego_key)) {

0 commit comments

Comments
 (0)