32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From d1f84c6baebc480106c9558dea4842ecb3059017 Mon Sep 17 00:00:00 2001
|
|
From: Shyam Prasad N <sprasad@microsoft.com>
|
|
Date: Mon, 2 Jun 2025 22:37:14 +0530
|
|
Subject: cifs: update dstaddr whenever channel iface is updated
|
|
|
|
When the server interface info changes (more common in clustered
|
|
servers like Azure Files), the per-channel iface gets updated.
|
|
However, this did not update the corresponding dstaddr. As a result
|
|
these channels will still connect (or try connecting) to older addresses.
|
|
|
|
Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary")
|
|
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/sess.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/fs/smb/client/sess.c
|
|
+++ b/fs/smb/client/sess.c
|
|
@@ -445,6 +445,10 @@ cifs_chan_update_iface(struct cifs_ses *
|
|
|
|
ses->chans[chan_index].iface = iface;
|
|
spin_unlock(&ses->chan_lock);
|
|
+
|
|
+ spin_lock(&server->srv_lock);
|
|
+ memcpy(&server->dstaddr, &iface->sockaddr, sizeof(server->dstaddr));
|
|
+ spin_unlock(&server->srv_lock);
|
|
}
|
|
|
|
static int
|