Skip to content

Commit

Permalink
cifs: return errors during session setup during reconnects
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sprasad-microsoft authored and Steve French committed Jun 6, 2022
1 parent c36ee7d commit 8ea2182
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/cifs/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
mutex_unlock(&ses->session_mutex);
rc = -EHOSTDOWN;
goto failed;
} else if (rc) {
mutex_unlock(&ses->session_mutex);
goto out;
}
} else {
mutex_unlock(&ses->session_mutex);
Expand Down

0 comments on commit 8ea2182

Please sign in to comment.