]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
cifs: open_cached_dir should not rely on primary channel
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 17 Jan 2024 05:55:39 +0000 (05:55 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 19 Jan 2024 03:01:04 +0000 (21:01 -0600)
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>
fs/smb/client/cached_dir.c

index d64a306a414be0580e910842b19f150bf43863a9..971892620504730e6e2265f50c54874f3d676eac 100644 (file)
@@ -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)