Skip to content

Commit 8ea2182

Browse files
sprasad-microsoftSteve French
authored andcommitted
cifs: return errors during session setup during reconnects
During reconnects, we check the return value from cifs_negotiate_protocol, and have handlers for both success and failures. But if that passes, and cifs_setup_session returns any errors other than -EACCES, we do not handle that. This fix adds a handler for that, so that we don't go ahead and try a tree_connect on a failed session. Signed-off-by: Shyam Prasad N <[email protected]> Reviewed-by: Enzo Matsumiya <[email protected]> Cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent c36ee7d commit 8ea2182

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/cifs/smb2pdu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
288288
mutex_unlock(&ses->session_mutex);
289289
rc = -EHOSTDOWN;
290290
goto failed;
291+
} else if (rc) {
292+
mutex_unlock(&ses->session_mutex);
293+
goto out;
291294
}
292295
} else {
293296
mutex_unlock(&ses->session_mutex);

0 commit comments

Comments
 (0)