nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
authorHannes Reinecke <hare@suse.de>
Wed, 26 May 2021 15:23:17 +0000 (17:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 08:00:05 +0000 (10:00 +0200)
commit155c2fea4b31fc0ca5b3028c1ceea03c49ec8884
treede85e249f4139c34e017489f49a8348b260bb302
parent620424df29a0bf8fe0da7b9c96692e61bba704cf
nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()

[ Upstream commit 4237de2f73a669e4f89ac0aa2b44fb1a1d9ec583 ]

We need to check the NVME_LOOP_Q_LIVE flag in
nvme_loop_destroy_admin_queue() to protect against duplicate
invocations eg during concurrent reset and remove calls.

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>
drivers/nvme/target/loop.c