diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2019-01-15 15:52:29 -0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-03-05 18:10:01 -0600 |
commit | 3349c3a79fb5d7632bfe426c014cbb589d1ca8e0 (patch) | |
tree | 21c3a55530782e36a9efb962abb67f73769b345d /fs/cifs/smb2pdu.c | |
parent | 34f4deb7c56c6fdc77a7e414203f0045bb6db32b (diff) | |
download | blackbird-op-linux-3349c3a79fb5d7632bfe426c014cbb589d1ca8e0.tar.gz blackbird-op-linux-3349c3a79fb5d7632bfe426c014cbb589d1ca8e0.zip |
CIFS: Check for reconnects before sending async requests
The reconnect might have happended after we obtained credits
and before we acquired srv_mutex. Check for that under the mutex
and retry an async operation if the reconnect is detected.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 7d8f1d234906..710531245ed7 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3034,7 +3034,7 @@ SMB2_echo(struct TCP_Server_Info *server) iov[0].iov_base = (char *)req; rc = cifs_call_async(server, &rqst, NULL, smb2_echo_callback, NULL, - server, CIFS_ECHO_OP); + server, CIFS_ECHO_OP, NULL); if (rc) cifs_dbg(FYI, "Echo request failed: %d\n", rc); @@ -3343,7 +3343,8 @@ smb2_async_readv(struct cifs_readdata *rdata) kref_get(&rdata->refcount); rc = cifs_call_async(io_parms.tcon->ses->server, &rqst, cifs_readv_receive, smb2_readv_callback, - smb3_handle_read_data, rdata, flags); + smb3_handle_read_data, rdata, flags, + &rdata->credits); if (rc) { kref_put(&rdata->refcount, cifs_readdata_release); cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE); @@ -3645,7 +3646,7 @@ smb2_async_writev(struct cifs_writedata *wdata, kref_get(&wdata->refcount); rc = cifs_call_async(server, &rqst, NULL, smb2_writev_callback, NULL, - wdata, flags); + wdata, flags, &wdata->credits); if (rc) { trace_smb3_write_err(0 /* no xid */, req->PersistentFileId, |