summaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2019-10-16 13:51:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-21 10:57:31 +0100
commit5cceead714c5b513ec9072b8e69d10e0f03d622d (patch)
treef298aadc7af9557f29796702e5fd993b564ddd15 /fs/cifs/transport.c
parent7438617d2cba3c546394fa7bc295f69dfc9fd757 (diff)
downloadlinux-stable-5cceead714c5b513ec9072b8e69d10e0f03d622d.tar.gz
linux-stable-5cceead714c5b513ec9072b8e69d10e0f03d622d.tar.bz2
linux-stable-5cceead714c5b513ec9072b8e69d10e0f03d622d.zip
cifs: smbd: Return -EAGAIN when transport is reconnecting
commit 4357d45f50e58672e1d17648d792f27df01dfccd upstream. During reconnecting, the transport may have already been destroyed and is in the process being reconnected. In this case, return -EAGAIN to not fail and to retry this I/O. 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>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r--fs/cifs/transport.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index fe77f41bff9f..0c4df56c825a 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -286,8 +286,11 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
int val = 1;
__be32 rfc1002_marker;
- if (cifs_rdma_enabled(server) && server->smbd_conn) {
- rc = smbd_send(server, num_rqst, rqst);
+ if (cifs_rdma_enabled(server)) {
+ /* return -EAGAIN when connecting or reconnecting */
+ rc = -EAGAIN;
+ if (server->smbd_conn)
+ rc = smbd_send(server, num_rqst, rqst);
goto smbd_done;
}
if (ssocket == NULL)