From: Nitzan Carmi Date: Tue, 20 Mar 2018 11:07:29 +0000 (+0000) Subject: nvme-rdma: Allow DELETING state change failure in error_recovery X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=187c0832ee80250036adb386b5ffa8f4bcb0ff1e;p=linux.git nvme-rdma: Allow DELETING state change failure in error_recovery While error recovery is ongoing, it is OK to move ctrl to DELETING state (from concurrent delete_work). Thus we don't need a warning for that case. Signed-off-by: Nitzan Carmi Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 250b2778bb97d..5e731f2c329c4 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -973,8 +973,8 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work) nvme_start_queues(&ctrl->ctrl); if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) { - /* state change failure should never happen */ - WARN_ON_ONCE(1); + /* state change failure is ok if we're in DELETING state */ + WARN_ON_ONCE(ctrl->ctrl.state != NVME_CTRL_DELETING); return; }