nvme: flush namespace scanning work just before removing namespaces
nvme_stop_ctrl can be called also for reset flow and there is no need to
flush the scan_work as namespaces are not being removed. This can cause
deadlock in rdma, fc and loop drivers since nvme_stop_ctrl barriers
before controller teardown (and specifically I/O cancellation of the
scan_work itself) takes place, but the scan_work will be blocked anyways
so there is no need to flush it.
Instead, move scan_work flush to nvme_remove_namespaces() where it really
needs to flush.
Reported-by: Ming Lei <email@example.com>
Signed-off-by: Sagi Grimberg <firstname.lastname@example.org>
Reviewed-by: Keith Busch <email@example.com>
Reviewed by: James Smart <firstname.lastname@example.org>
Tested-by: Ewan D. Milne <email@example.com>
Signed-off-by: Christoph Hellwig <firstname.lastname@example.org>
1 file changed