* [PATCH AUTOSEL 6.1 3/5] cifs: open_cached_dir should not rely on primary channel
[not found] <20240129183559.464502-1-sashal@kernel.org>
@ 2024-01-29 18:35 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2024-01-29 18:35 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Shyam Prasad N, Steve French, Sasha Levin, sfrench, linux-cifs,
samba-technical
From: Shyam Prasad N <sprasad@microsoft.com>
[ Upstream commit 936eba9cfb5cfbf6a2c762cd163605f2b784e03e ]
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>
---
fs/smb/client/cached_dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index 5a132c1e6f6c..64091929da71 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -149,7 +149,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)
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-29 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240129183559.464502-1-sashal@kernel.org>
2024-01-29 18:35 ` [PATCH AUTOSEL 6.1 3/5] cifs: open_cached_dir should not rely on primary channel Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox