Skip to content

Commit fc43a8a

Browse files
sprasad-microsoftSteve French
authored andcommitted
cifs: cifs_pick_channel should try selecting active channels
cifs_pick_channel today just selects a channel based on the policy of least loaded channel. However, it does not take into account if the channel needs reconnect. As a result, we can have failures in send that can be completely avoided. This change doesn't make a channel a candidate for this selection if it needs reconnect. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 966cc17 commit fc43a8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/smb/client/transport.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,9 @@ struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
10261026
if (!server || server->terminate)
10271027
continue;
10281028

1029+
if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
1030+
continue;
1031+
10291032
/*
10301033
* strictly speaking, we should pick up req_lock to read
10311034
* server->in_flight. But it shouldn't matter much here if we

0 commit comments

Comments
 (0)