summaryrefslogtreecommitdiff
path: root/drivers/nvme/target/rdma.c
diff options
context:
space:
mode:
authorVijay Immanuel <vijayi@attalasystems.com>2017-05-09 02:38:35 +0300
committerJens Axboe <axboe@fb.com>2017-05-20 19:11:34 +0300
commit549f01ae7b913355bea76100d3f17694bc9ec769 (patch)
treeb94a9dc76ab613e79ee59549afc22100e203362d /drivers/nvme/target/rdma.c
parent4b8ba5fa525bc8bdaaed2a5c5433f0f2008d7bc5 (diff)
downloadlinux-549f01ae7b913355bea76100d3f17694bc9ec769.tar.xz
nvmet: release the sq ref on rdma read errors
On rdma read errors, release the sq ref that was taken when the req was initialized. This avoids a hang in nvmet_sq_destroy() when the queue is being freed. Signed-off-by: Vijay Immanuel <vijayi@attalasystems.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/target/rdma.c')
-rw-r--r--drivers/nvme/target/rdma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index 99c69018a35f..9e45cde63376 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -567,6 +567,7 @@ static void nvmet_rdma_read_data_done(struct ib_cq *cq, struct ib_wc *wc)
rsp->n_rdma = 0;
if (unlikely(wc->status != IB_WC_SUCCESS)) {
+ nvmet_req_uninit(&rsp->req);
nvmet_rdma_release_rsp(rsp);
if (wc->status != IB_WC_WR_FLUSH_ERR) {
pr_info("RDMA READ for CQE 0x%p failed with status %s (%d).\n",