mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
cifs: detect dead connections only when echoes are enabled.
commit f4916649f9 upstream.
We can detect server unresponsiveness only if echoes are enabled.
Echoes can be disabled under two scenarios:
1. The connection is low on credits, so we've disabled echoes/oplocks.
2. The connection has not seen any request till now (other than
negotiate/sess-setup), which is when we enable these two, based on
the credits available.
So this fix will check for dead connection, only when echo is enabled.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
CC: <stable@vger.kernel.org> # v5.8+
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
23d7b4a8f7
commit
8a90058752
@@ -663,6 +663,7 @@ server_unresponsive(struct TCP_Server_Info *server)
|
||||
*/
|
||||
if ((server->tcpStatus == CifsGood ||
|
||||
server->tcpStatus == CifsNeedNegotiate) &&
|
||||
(!server->ops->can_echo || server->ops->can_echo(server)) &&
|
||||
time_after(jiffies, server->lstrp + 3 * server->echo_interval)) {
|
||||
cifs_server_dbg(VFS, "has not responded in %lu seconds. Reconnecting...\n",
|
||||
(3 * server->echo_interval) / HZ);
|
||||
|
||||
Reference in New Issue
Block a user