diff options
author | Pavel Shilovsky <piastryyy@gmail.com> | 2019-03-06 00:51:56 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-03-06 01:14:39 +0100 |
commit | afc18a6f7b849a4935f3b4d782c902749b1580fd (patch) | |
tree | 217068573701d607e2037d67fd6be807e9d98370 /fs/cifs/transport.c | |
parent | CIFS: Only send SMB2_NEGOTIATE command on new TCP connections (diff) | |
download | linux-afc18a6f7b849a4935f3b4d782c902749b1580fd.tar.xz linux-afc18a6f7b849a4935f3b4d782c902749b1580fd.zip |
CIFS: Return -EAGAIN instead of -ENOTSOCK
When we attempt to send a packet while the demultiplex thread
is in the middle of cifs_reconnect() we may end up returning
-ENOTSOCK to upper layers. The intent here is to retry the request
once the TCP connection is up, so change it to return -EAGAIN
instead. The latter error code is retryable and the upper layers
will retry the request if needed.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 9c3a6809194c..9f23a4556131 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -301,8 +301,9 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, rc = smbd_send(server, rqst); goto smbd_done; } + if (ssocket == NULL) - return -ENOTSOCK; + return -EAGAIN; /* cork the socket */ kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK, |