diff options
| author | Shyam Prasad N <sprasad@microsoft.com> | 2025-06-02 22:37:14 +0530 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-06-02 13:34:27 -0500 |
| commit | c1846893991f3b4ec8a0cc12219ada153f0814d6 (patch) | |
| tree | 198dfdf86c8790cf81bee82ee1dc49a8dcb4ac00 | |
| parent | 1f396b9bfe39aaf55ea74a7005806164b236653d (diff) | |
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>
| -rw-r--r-- | fs/smb/client/sess.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c index 79b4bd45e31a..ec0db32c7d98 100644 --- a/fs/smb/client/sess.c +++ b/fs/smb/client/sess.c @@ -445,6 +445,10 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) 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 |
