diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2023-12-29 14:16:18 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-01-08 00:46:06 +0300 |
commit | 516eea97f92f1e7271f20835cfe9e73774b0f8cc (patch) | |
tree | 60024438f2a7b29d726e0a9631caa56996f9d543 /fs/smb/client/sess.c | |
parent | 9c38568a75c160786d5f5d5b96aeefed0c1b76bd (diff) | |
download | linux-516eea97f92f1e7271f20835cfe9e73774b0f8cc.tar.xz |
cifs: fix in logging in cifs_chan_update_iface
Recently, cifs_chan_update_iface was modified to not
remove an iface if a suitable replacement was not found.
With that, there were two conditionals that were exactly
the same. This change removes that extra condition check.
Also, fixed a logging in the same function to indicate
the correct message.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/sess.c')
-rw-r--r-- | fs/smb/client/sess.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c index 2d3b332a79a1..a16e175731eb 100644 --- a/fs/smb/client/sess.c +++ b/fs/smb/client/sess.c @@ -440,8 +440,14 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) } if (!iface) { - cifs_dbg(FYI, "unable to get the interface matching: %pIS\n", - &ss); + if (!chan_index) + cifs_dbg(FYI, "unable to get the interface matching: %pIS\n", + &ss); + else { + cifs_dbg(FYI, "unable to find another interface to replace: %pIS\n", + &old_iface->sockaddr); + } + spin_unlock(&ses->iface_lock); return 0; } @@ -459,10 +465,6 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) iface->weight_fulfilled++; kref_put(&old_iface->refcount, release_iface); - } else if (old_iface) { - /* if a new candidate is not found, keep things as is */ - cifs_dbg(FYI, "could not replace iface: %pIS\n", - &old_iface->sockaddr); } else if (!chan_index) { /* special case: update interface for primary channel */ if (iface) { |