cifs: smbd: Return -ECONNABORTED when trasnport is not in connected state
authorLong Li <longli@microsoft.com>
Wed, 16 Oct 2019 20:51:54 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 10:04:43 +0000 (11:04 +0100)
commit acd4680e2bef2405a0e1ef2149fbb01cce7e116c upstream.

The transport should return this error so the upper layer will reconnect.

Signed-off-by: Long Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smbdirect.c

index b442bfaf292b59470eab0b2d79a2c8a00512df01..5b1b97e9e0c9bc73d7e6340496628b4771cbb459 100644 (file)
@@ -1972,7 +1972,7 @@ read_rfc1002_done:
 
        if (info->transport_status != SMBD_CONNECTED) {
                log_read(ERR, "disconnected\n");
-               return 0;
+               return -ECONNABORTED;
        }
 
        goto again;