nvmet-tcp: avoid circular locking dependency on install_queue()
authorHannes Reinecke <hare@suse.de>
Fri, 8 Dec 2023 12:53:20 +0000 (13:53 +0100)
committerKeith Busch <kbusch@kernel.org>
Wed, 10 Jan 2024 21:27:32 +0000 (13:27 -0800)
commit07a29b134ce8e47aef15ea71eab8e6b3734a9720
tree2e072857ee806bdfd582d92ae29b3e8db391edec
parent06c59d427017fcde3107c236177fcc74c9db7909
nvmet-tcp: avoid circular locking dependency on install_queue()

nvmet_tcp_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/tcp.c