summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-05-26 17:23:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-18 09:58:59 +0200
commit655d4dc10a231f1fc7abaff870c1f35fab764a86 (patch)
treec8dd9a869e709e6d200e583c13e2f344f87a6608
parented4bee6e1bb7419311b72ad464e5a383aff69a40 (diff)
downloadlinux-stable-655d4dc10a231f1fc7abaff870c1f35fab764a86.tar.gz
linux-stable-655d4dc10a231f1fc7abaff870c1f35fab764a86.tar.bz2
linux-stable-655d4dc10a231f1fc7abaff870c1f35fab764a86.zip
nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
[ Upstream commit 1c5f8e882a05de5c011e8c3fbeceb0d1c590eb53 ] 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 <hare@suse.de> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/nvme/target/loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index b4f5503ae570..f752e9432676 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -395,6 +395,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);