Skip to content

Commit b797209

Browse files
longlimsftsmfrench
authored andcommitted
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>
1 parent 62fdf67 commit b797209

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/cifs/smb2pdu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3223,7 +3223,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
32233223
rdata->nr_pages, rdata->page_offset,
32243224
rdata->tailsz, true, need_invalidate);
32253225
if (!rdata->mr)
3226-
return -ENOBUFS;
3226+
return -EAGAIN;
32273227

32283228
req->Channel = SMB2_CHANNEL_RDMA_V1_INVALIDATE;
32293229
if (need_invalidate)
@@ -3628,7 +3628,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
36283628
wdata->nr_pages, wdata->page_offset,
36293629
wdata->tailsz, false, need_invalidate);
36303630
if (!wdata->mr) {
3631-
rc = -ENOBUFS;
3631+
rc = -EAGAIN;
36323632
goto async_writev_out;
36333633
}
36343634
req->Length = 0;

0 commit comments

Comments
 (0)