summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2019-10-16 13:51:56 -0700
committerSteve French <stfrench@microsoft.com>2019-11-25 01:16:30 -0600
commit4357d45f50e58672e1d17648d792f27df01dfccd (patch)
treeef5c77c9ea74e3ce4d71680b3ca8a273ecc94e73 /fs/cifs
parentc21ce58eab1eda4c66507897207e20c82e62a5ac (diff)
cifs: smbd: Return -EAGAIN when transport is reconnecting
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>
Diffstat (limited to 'fs/cifs')
-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 19300e0cf1d6..4104f59e5bd6 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -325,8 +325,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;
}