Skip to content

Commit f3092a3

Browse files
hac-vSasha Levin
authored andcommitted
smb: client: fix cifs_pick_channel when channel needs reconnect
commit 7928019 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fd04d07 commit f3092a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/transport.c

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

834-
if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
834+
if (CIFS_CHAN_NEEDS_RECONNECT(ses, cur))
835835
continue;
836836

837837
/*

0 commit comments

Comments
 (0)