aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2019-04-05 17:36:34 -0400
committerSteve French <stfrench@microsoft.com>2019-05-08 00:24:55 -0400
commitb7972092199f6d4eb10cc44095bbe3931116fc4b (patch)
tree900c90e37d39647d2c247f6c480c386f8c266b59
parent62fdf6707ebd46ae97e3cb7a7d246b05c3c619f1 (diff)
cifs: smbd: Retry on memory registration failure
Memory registration failure doesn't mean this I/O has failed, it means the transport is hitting I/O error or needs reconnect. This error is not from the server. Indicate this error to upper layer, and let upper layer decide how to reconnect and proceed with this I/O. Signed-off-by: Long Li <longli@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/cifs/smb2pdu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index a37774a55f3a..36cc34318429 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3223,7 +3223,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
3223 rdata->nr_pages, rdata->page_offset, 3223 rdata->nr_pages, rdata->page_offset,
3224 rdata->tailsz, true, need_invalidate); 3224 rdata->tailsz, true, need_invalidate);
3225 if (!rdata->mr) 3225 if (!rdata->mr)
3226 return -ENOBUFS; 3226 return -EAGAIN;
3227 3227
3228 req->Channel = SMB2_CHANNEL_RDMA_V1_INVALIDATE; 3228 req->Channel = SMB2_CHANNEL_RDMA_V1_INVALIDATE;
3229 if (need_invalidate) 3229 if (need_invalidate)
@@ -3628,7 +3628,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
3628 wdata->nr_pages, wdata->page_offset, 3628 wdata->nr_pages, wdata->page_offset,
3629 wdata->tailsz, false, need_invalidate); 3629 wdata->tailsz, false, need_invalidate);
3630 if (!wdata->mr) { 3630 if (!wdata->mr) {
3631 rc = -ENOBUFS; 3631 rc = -EAGAIN;
3632 goto async_writev_out; 3632 goto async_writev_out;
3633 } 3633 }
3634 req->Length = 0; 3634 req->Length = 0;