Skip to content

Commit 7928019

Browse files
hac-vsmfrench
authored andcommitted
smb: client: fix cifs_pick_channel when channel needs reconnect
cifs_pick_channel iterates candidate channels using cur. The reconnect-state test mistakenly used a different variable. This checked the wrong slot and would cause us to skip a healthy channel and to dispatch on one that needs reconnect, occasionally failing operations when a channel was down. Fix by replacing for the correct variable. Fixes: fc43a8a ("cifs: cifs_pick_channel should try selecting active channels") Cc: stable@vger.kernel.org Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent e9a6fb0 commit 7928019

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/smb/client/transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
830830
if (!server || server->terminate)
831831
continue;
832832

833-
if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
833+
if (CIFS_CHAN_NEEDS_RECONNECT(ses, cur))
834834
continue;
835835

836836
/*

0 commit comments

Comments
 (0)