nvme: fix possible hang when removing a controller during error recovery
authorMing Lei <ming.lei@redhat.com>
Tue, 11 Jul 2023 09:40:39 +0000 (17:40 +0800)
committerKeith Busch <kbusch@kernel.org>
Fri, 21 Jul 2023 07:53:26 +0000 (00:53 -0700)
commit1b95e817916069ec45a7f259d088fd1c091a8cc6
treece8c40f4b8faea475780a028eb9bf227e49e004d
parentb8f6446b6853768cb99e7c201bddce69ca60c15e
nvme: fix possible hang when removing a controller during error recovery

Error recovery can be interrupted by controller removal, then the
controller is left as quiesced, and IO hang can be caused.

Fix the issue by unquiescing controller unconditionally when removing
namespaces.

This way is reasonable and safe given forward progress can be made
when removing namespaces.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reported-by: Chunguang Xu <brookxu.cn@gmail.com>
Closes: https://lore.kernel.org/linux-nvme/cover.1685350577.git.chunguang.xu@shopee.com/
Cc: stable@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c