cifs: detect dead connections only when echoes are enabled.
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 29 Apr 2021 07:53:18 +0000 (07:53 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 3 May 2021 16:49:13 +0000 (11:49 -0500)
commitf4916649f98e2c7bdba38c6597a98c456c17317d
tree10844b718715c19358014e1040595ba926a04c6c
parent7ba3d1cdb7988ccfbc6e4995dee04510c85fefbc
cifs: detect dead connections only when echoes are enabled.

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>
fs/cifs/connect.c