summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-10-18 22:59:47 +0300
committerSagi Grimberg <sagi@grimberg.me>2016-12-06 11:17:03 +0300
commit70d4281c4b7049794e6d66baac7a18ad943cf726 (patch)
tree3d661603c512ec30a36ff3df5704031be0e6c991 /drivers/nvme
parente88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed (diff)
downloadlinux-70d4281c4b7049794e6d66baac7a18ad943cf726.tar.xz
nvmet-rdma: Fix REJ status code
nvmet_sq_init() returns a value <= 0. nvmet_rdma_cm_reject() expects a second argument that is a NVME_RDMA_CM_* constant. Hence this patch. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimbeg.me> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/target/rdma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index f8d23999e0f2..35b97a898ecd 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -1044,8 +1044,10 @@ nvmet_rdma_alloc_queue(struct nvmet_rdma_device *ndev,
}
ret = nvmet_sq_init(&queue->nvme_sq);
- if (ret)
+ if (ret) {
+ ret = NVME_RDMA_CM_NO_RSC;
goto out_free_queue;
+ }
ret = nvmet_rdma_parse_cm_connect_req(&event->param.conn, queue);
if (ret)
@@ -1114,6 +1116,7 @@ out_destroy_sq:
out_free_queue:
kfree(queue);
out_reject:
+ pr_debug("rejecting connect request with status code %d\n", ret);
nvmet_rdma_cm_reject(cm_id, ret);
return NULL;
}