[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250331082251.123381-3-r.smirnov@omp.ru>
Date: Mon, 31 Mar 2025 11:22:50 +0300
From: Roman Smirnov <r.smirnov@....ru>
To: Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>,
Ronnie Sahlberg <ronniesahlberg@...il.com>, Shyam Prasad N
<sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>, Bharath SM
<bharathsm@...rosoft.com>
CC: Roman Smirnov <r.smirnov@....ru>, Sachin Prabhu <sprabhu@...hat.com>,
Shirish Pargaonkar <shirishpargaonkar@...il.com>,
<linux-cifs@...r.kernel.org>, <samba-technical@...ts.samba.org>,
<linux-kernel@...r.kernel.org>, <lvc-project@...uxtesting.org>
Subject: [PATCH 2/2] cifs: remove unreachable code in cifs_get_tcp_session()
echo_interval is checked at mount time, the code has become
unreachable.
Signed-off-by: Roman Smirnov <r.smirnov@....ru>
---
fs/smb/client/connect.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 73f93a35eedd..84efcb541ab2 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -1729,12 +1729,8 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
*/
tcp_ses->tcpStatus = CifsNew;
++tcp_ses->srv_count;
+ tcp_ses->echo_interval = ctx->echo_interval * HZ;
- if (ctx->echo_interval >= SMB_ECHO_INTERVAL_MIN &&
- ctx->echo_interval <= SMB_ECHO_INTERVAL_MAX)
- tcp_ses->echo_interval = ctx->echo_interval * HZ;
- else
- tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
if (tcp_ses->rdma) {
#ifndef CONFIG_CIFS_SMB_DIRECT
cifs_dbg(VFS, "CONFIG_CIFS_SMB_DIRECT is not enabled\n");
--
2.34.1
Powered by blists - more mailing lists