]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
cifs: force interface update before a fresh session setup
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 30 Oct 2023 11:00:11 +0000 (11:00 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 2 Nov 2023 13:06:06 +0000 (08:06 -0500)
During a session reconnect, it is possible that the
server moved to another physical server (happens in case
of Azure files). So at this time, force a query of server
interfaces again (in case of multichannel session), such
that the secondary channels connect to the right
IP addresses (possibly updated now).

Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/connect.c

index a7147fa55c0c257fe97453d299c61ff605d2602d..1a137b33858a1fc905bd1ca8630151c45778431b 100644 (file)
@@ -3849,8 +3849,12 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
        is_binding = !CIFS_ALL_CHANS_NEED_RECONNECT(ses);
        spin_unlock(&ses->chan_lock);
 
-       if (!is_binding)
+       if (!is_binding) {
                ses->ses_status = SES_IN_SETUP;
+
+               /* force iface_list refresh */
+               ses->iface_last_update = 0;
+       }
        spin_unlock(&ses->ses_lock);
 
        /* update ses ip_addr only for primary chan */