summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2021-05-01 19:17:07 +0300
committerSteve French <stfrench@microsoft.com>2021-05-03 19:54:29 +0300
commit5b2abdafbedb902d7d8d3d5e571a38b8900dd15f (patch)
treee88095e19d5d15e4c2e61241e15b141ddad989de /fs
parentf4916649f98e2c7bdba38c6597a98c456c17317d (diff)
downloadlinux-5b2abdafbedb902d7d8d3d5e571a38b8900dd15f.tar.xz
cifs: use echo_interval even when connection not ready.
When the tcp connection is not ready to send requests, we keep retrying echo with an interval of zero. This seems unnecessary, and this fix changes the interval between echoes to what is specified as echo_interval. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/connect.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index becd5f807787..d7efbcb2d5df 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -392,16 +392,6 @@ cifs_echo_request(struct work_struct *work)
int rc;
struct TCP_Server_Info *server = container_of(work,
struct TCP_Server_Info, echo.work);
- unsigned long echo_interval;
-
- /*
- * If we need to renegotiate, set echo interval to zero to
- * immediately call echo service where we can renegotiate.
- */
- if (server->tcpStatus == CifsNeedNegotiate)
- echo_interval = 0;
- else
- echo_interval = server->echo_interval;
/*
* We cannot send an echo if it is disabled.
@@ -412,7 +402,7 @@ cifs_echo_request(struct work_struct *work)
server->tcpStatus == CifsExiting ||
server->tcpStatus == CifsNew ||
(server->ops->can_echo && !server->ops->can_echo(server)) ||
- time_before(jiffies, server->lstrp + echo_interval - HZ))
+ time_before(jiffies, server->lstrp + server->echo_interval - HZ))
goto requeue_echo;
rc = server->ops->echo ? server->ops->echo(server) : -ENOSYS;