From: Ming Lei Date: Thu, 14 Oct 2021 08:17:09 +0000 (+0800) Subject: nvme: loop: clear NVME_CTRL_ADMIN_Q_STOPPED after admin queue is reallocated X-Git-Tag: v6.1-rc5~2683^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d35d519d8bf224ccdb43f9a235b8bda2d6d453c;p=platform%2Fkernel%2Flinux-starfive.git nvme: loop: clear NVME_CTRL_ADMIN_Q_STOPPED after admin queue is reallocated The nvme-loop's admin queue may be freed and reallocated, and we have to reset the flag of NVME_CTRL_ADMIN_Q_STOPPED so that the flag can match with the quiesce state of the admin queue. nvme-loop is the only driver to reallocate request queue, and not see such usage in other nvme drivers. Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20211014081710.1871747-6-ming.lei@redhat.com Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c index 440e1544..eb10942 100644 --- a/drivers/nvme/target/loop.c +++ b/drivers/nvme/target/loop.c @@ -384,6 +384,8 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl) error = PTR_ERR(ctrl->ctrl.admin_q); goto out_cleanup_fabrics_q; } + /* reset stopped state for the fresh admin queue */ + clear_bit(NVME_CTRL_ADMIN_Q_STOPPED, &ctrl->ctrl.flags); error = nvmf_connect_admin_queue(&ctrl->ctrl); if (error)