Skip to content

Commit

Permalink
cifs: open_cached_dir should not rely on primary channel
Browse files Browse the repository at this point in the history
[ Upstream commit 936eba9 ]

open_cached_dir today selects ses->server a.k.a primary channel
to send requests. When multichannel is used, the primary
channel maybe down. So it does not make sense to rely only
on that channel.

This fix makes this function pick a channel with the standard
helper function cifs_pick_channel.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
sprasad-microsoft authored and gregkh committed Mar 1, 2024
1 parent 36bc504 commit 8d76726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/smb/client/cached_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
return -EOPNOTSUPP;

ses = tcon->ses;
server = ses->server;
server = cifs_pick_channel(ses);
cfids = tcon->cfids;

if (!server->ops->new_lease_key)
Expand Down

0 comments on commit 8d76726

Please sign in to comment.