From: Hannes Reinecke Date: Wed, 26 May 2021 15:23:16 +0000 (+0200) Subject: nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails X-Git-Tag: v5.15~981^2~4^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c5f8e882a05de5c011e8c3fbeceb0d1c590eb53;p=platform%2Fkernel%2Flinux-starfive.git nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails When the call to nvme_enable_ctrl() in nvme_loop_configure_admin_queue() fails the NVME_LOOP_Q_LIVE flag is not cleared. Signed-off-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c index 93fca31..8643c71 100644 --- a/drivers/nvme/target/loop.c +++ b/drivers/nvme/target/loop.c @@ -406,6 +406,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl) return 0; out_cleanup_queue: + clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags); blk_cleanup_queue(ctrl->ctrl.admin_q); out_cleanup_fabrics_q: blk_cleanup_queue(ctrl->ctrl.fabrics_q);