Skip to content

Commit 5b2abda

Browse files
sprasad-microsoftsmfrench
authored andcommitted
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 <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent f491664 commit 5b2abda

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

fs/cifs/connect.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,6 @@ cifs_echo_request(struct work_struct *work)
392392
int rc;
393393
struct TCP_Server_Info *server = container_of(work,
394394
struct TCP_Server_Info, echo.work);
395-
unsigned long echo_interval;
396-
397-
/*
398-
* If we need to renegotiate, set echo interval to zero to
399-
* immediately call echo service where we can renegotiate.
400-
*/
401-
if (server->tcpStatus == CifsNeedNegotiate)
402-
echo_interval = 0;
403-
else
404-
echo_interval = server->echo_interval;
405395

406396
/*
407397
* We cannot send an echo if it is disabled.
@@ -412,7 +402,7 @@ cifs_echo_request(struct work_struct *work)
412402
server->tcpStatus == CifsExiting ||
413403
server->tcpStatus == CifsNew ||
414404
(server->ops->can_echo && !server->ops->can_echo(server)) ||
415-
time_before(jiffies, server->lstrp + echo_interval - HZ))
405+
time_before(jiffies, server->lstrp + server->echo_interval - HZ))
416406
goto requeue_echo;
417407

418408
rc = server->ops->echo ? server->ops->echo(server) : -ENOSYS;

0 commit comments

Comments
 (0)