[PATCH rfc 15/30] nvme-rdma: don't check queue state for shutdown/disable

Sagi Grimberg sagi at grimberg.me
Sun Jun 18 08:21:49 PDT 2017


If the queue is not ready, it will be rejected in queue_rq

Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/rdma.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index fbe2ca4f4ba3..700aef42c4f2 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1730,12 +1730,10 @@ static void nvme_rdma_teardown_ctrl(struct nvme_rdma_ctrl *ctrl, bool shutdown)
 		nvme_rdma_destroy_io_queues(ctrl, shutdown);
 	}
 
-	if (test_bit(NVME_RDMA_Q_LIVE, &ctrl->queues[0].flags)) {
-		if (shutdown)
-			nvme_shutdown_ctrl(&ctrl->ctrl);
-		else
-			nvme_disable_ctrl(&ctrl->ctrl, ctrl->ctrl.cap);
-	}
+	if (shutdown)
+		nvme_shutdown_ctrl(&ctrl->ctrl);
+	else
+		nvme_disable_ctrl(&ctrl->ctrl, ctrl->ctrl.cap);
 
 	blk_mq_stop_hw_queues(ctrl->ctrl.admin_q);
 	blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
-- 
2.7.4




More information about the Linux-nvme mailing list