From: nspmangalore@gmail.com
To: smfrench@gmail.com, linux-cifs@vger.kernel.org, pc@manguebit.com,
meetakshisetiyaoss@gmail.com
Cc: Shyam Prasad N <sprasad@microsoft.com>
Subject: [PATCH 4/4] cifs: fix in logging in cifs_chan_update_iface
Date: Fri, 29 Dec 2023 11:16:18 +0000 [thread overview]
Message-ID: <20231229111618.38887-4-sprasad@microsoft.com> (raw)
In-Reply-To: <20231229111618.38887-1-sprasad@microsoft.com>
From: Shyam Prasad N <sprasad@microsoft.com>
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>
---
fs/smb/client/sess.c | 14 ++++++++------
1 file 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) {
--
2.34.1
next prev parent reply other threads:[~2023-12-29 11:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 11:16 [PATCH 1/4] cifs: cifs_chan_is_iface_active should be called with chan_lock held nspmangalore
2023-12-29 11:16 ` [PATCH 2/4] cifs: do not depend on release_iface for maintaining iface_list nspmangalore
2023-12-29 11:19 ` Shyam Prasad N
2023-12-29 11:16 ` [PATCH 3/4] cifs: cifs_pick_channel should skip unhealthy channels nspmangalore
2023-12-29 17:02 ` Shyam Prasad N
2023-12-29 17:15 ` Steve French
2023-12-29 11:16 ` nspmangalore [this message]
2023-12-29 11:25 ` [PATCH 1/4] cifs: cifs_chan_is_iface_active should be called with chan_lock held Shyam Prasad N
2023-12-29 14:57 ` Steve French
2023-12-29 15:01 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231229111618.38887-4-sprasad@microsoft.com \
--to=nspmangalore@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=meetakshisetiyaoss@gmail.com \
--cc=pc@manguebit.com \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox