diff options
author | Long Li <longli@microsoft.com> | 2018-03-30 15:16:36 -0700 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-04-01 20:24:40 -0500 |
commit | 21a4e14aaedbc85f203d37e56cb26235b22b43f6 (patch) | |
tree | 32468f7e6e5d2a8365b0f9d8f1d88945e98746f7 /fs/cifs/smbdirect.c | |
parent | 48f238a79f668f8ff013024d83010de551833d7f (diff) | |
download | linux-stable-21a4e14aaedbc85f203d37e56cb26235b22b43f6.tar.gz linux-stable-21a4e14aaedbc85f203d37e56cb26235b22b43f6.tar.bz2 linux-stable-21a4e14aaedbc85f203d37e56cb26235b22b43f6.zip |
cifs: smbd: disconnect transport on RDMA errors
On RDMA errors, transport should disconnect the RDMA CM connection. This
will notify the upper layer, and it will attempt transport reconnect.
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/smbdirect.c')
-rw-r--r-- | fs/cifs/smbdirect.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index 3f7883e2e14d..5008af546dd1 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -862,6 +862,8 @@ static int smbd_post_send_negotiate_req(struct smbd_connection *info) ib_dma_unmap_single(info->id->device, request->sge[0].addr, request->sge[0].length, DMA_TO_DEVICE); + smbd_disconnect_rdma_connection(info); + dma_mapping_failed: mempool_free(request, info->request_mempool); return rc; @@ -1061,6 +1063,7 @@ static int smbd_post_send(struct smbd_connection *info, if (atomic_dec_and_test(&info->send_pending)) wake_up(&info->wait_send_pending); } + smbd_disconnect_rdma_connection(info); } else /* Reset timer for idle connection after packet is sent */ mod_delayed_work(info->workqueue, &info->idle_timer_work, @@ -1202,7 +1205,7 @@ static int smbd_post_recv( if (rc) { ib_dma_unmap_single(info->id->device, response->sge.addr, response->sge.length, DMA_FROM_DEVICE); - + smbd_disconnect_rdma_connection(info); log_rdma_recv(ERR, "ib_post_recv failed rc=%d\n", rc); } @@ -2546,6 +2549,8 @@ dma_map_error: if (atomic_dec_and_test(&info->mr_used_count)) wake_up(&info->wait_for_mr_cleanup); + smbd_disconnect_rdma_connection(info); + return NULL; } |