[PATCH] nvme-rdma: fix nvme_ctrl_state() conversion
hare at kernel.org
hare at kernel.org
Thu Nov 30 05:42:10 PST 2023
From: Hannes Reinecke <hare at suse.de>
The argument to nvme_ctrl_state() is 'struct nvme_ctrl'.
Fixes: b59ea0f40072 ("nvme: introduce helper function to get ctrl state")
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
drivers/nvme/host/rdma.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 0ef2ac67d2ae..81e2621169e5 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -984,7 +984,7 @@ static void nvme_rdma_free_ctrl(struct nvme_ctrl *nctrl)
static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl)
{
- enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
+ enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
/* If we are resetting/deleting then do nothing */
if (state != NVME_CTRL_CONNECTING) {
@@ -1060,7 +1060,7 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
* unless we're during creation of a new controller to
* avoid races with teardown flow.
*/
- enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
+ enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
WARN_ON_ONCE(state != NVME_CTRL_DELETING &&
state != NVME_CTRL_DELETING_NOIO);
@@ -1132,7 +1132,7 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work)
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
/* state change failure is ok if we started ctrl delete */
- enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
+ enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
WARN_ON_ONCE(state != NVME_CTRL_DELETING &&
state != NVME_CTRL_DELETING_NOIO);
@@ -1167,7 +1167,7 @@ static void nvme_rdma_wr_error(struct ib_cq *cq, struct ib_wc *wc,
struct nvme_rdma_queue *queue = wc->qp->qp_context;
struct nvme_rdma_ctrl *ctrl = queue->ctrl;
- if (nvme_ctrl_state(ctrl) == NVME_CTRL_LIVE)
+ if (nvme_ctrl_state(&ctrl->ctrl) == NVME_CTRL_LIVE)
dev_info(ctrl->ctrl.device,
"%s for CQE 0x%p failed with status %s (%d)\n",
op, wc->wr_cqe,
@@ -1950,7 +1950,7 @@ static enum blk_eh_timer_return nvme_rdma_timeout(struct request *rq)
dev_warn(ctrl->ctrl.device, "I/O %d QID %d timeout\n",
rq->tag, nvme_rdma_queue_idx(queue));
- if (nvme_ctrl_state(ctrl) != NVME_CTRL_LIVE) {
+ if (nvme_ctrl_state(&ctrl->ctrl) != NVME_CTRL_LIVE) {
/*
* If we are resetting, connecting or deleting we should
* complete immediately because we may block controller
--
2.35.3
More information about the Linux-nvme
mailing list