]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nvme-rdma: Allow DELETING state change failure in error_recovery
authorNitzan Carmi <nitzanc@mellanox.com>
Tue, 20 Mar 2018 11:07:29 +0000 (11:07 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Mar 2018 14:53:43 +0000 (08:53 -0600)
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>
drivers/nvme/host/rdma.c

index 250b2778bb97d7e3939705806e4aec432348aa28..5e731f2c329c4c29c522789f6fbcea6f88685d75 100644 (file)
@@ -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;
        }