summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorNitzan Carmi <nitzanc@mellanox.com>2018-03-20 12:07:29 +0100
committerJens Axboe <axboe@kernel.dk>2018-03-26 16:53:43 +0200
commit187c0832ee80250036adb386b5ffa8f4bcb0ff1e (patch)
treebda12b015ffedc1861fd97c8fd51e2e7411ca34c /drivers/nvme
parentnvme: Skip checking heads without namespaces (diff)
downloadlinux-187c0832ee80250036adb386b5ffa8f4bcb0ff1e.tar.xz
linux-187c0832ee80250036adb386b5ffa8f4bcb0ff1e.zip
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 <nitzanc@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/rdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 250b2778bb97..5e731f2c329c 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;
}