nvmet-rdma: avoid circular locking dependency on install_queue()
authorHannes Reinecke <hare@suse.de>
Fri, 8 Dec 2023 12:53:21 +0000 (13:53 +0100)
committerKeith Busch <kbusch@kernel.org>
Wed, 10 Jan 2024 21:27:45 +0000 (13:27 -0800)
commit31deaeb11ba7a885116c9c30892b9f763c04d59c
treecb074fe9e24f06493a217f85e1d4b5c8fb8e5254
parent07a29b134ce8e47aef15ea71eab8e6b3734a9720
nvmet-rdma: avoid circular locking dependency on install_queue()

nvmet_rdma_install_queue() is driven from the ->io_work workqueue
function, but will call flush_workqueue() which might trigger
->release_work() which in itself calls flush_work on ->io_work.

To avoid that check for pending queue in disconnecting status,
and return 'controller busy' when we reached a certain threshold.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/rdma.c