]> Git Repo - linux.git/commitdiff
cifs: use echo_interval even when connection not ready.
authorShyam Prasad N <[email protected]>
Sat, 1 May 2021 16:17:07 +0000 (16:17 +0000)
committerSteve French <[email protected]>
Mon, 3 May 2021 16:54:29 +0000 (11:54 -0500)
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]>
fs/cifs/connect.c

index becd5f807787b1fc5af2d653e4fa00454ffdb3a2..d7efbcb2d5dfe2b6163a345abef8a2320d6fb531 100644 (file)
@@ -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;
This page took 0.06841 seconds and 4 git commands to generate.