nvmet-fcloop: Do not wait on completion when unregister fails
authorDaniel Wagner <dwagner@suse.de>
Tue, 6 Jun 2023 12:24:11 +0000 (14:24 +0200)
committerKeith Busch <kbusch@kernel.org>
Mon, 12 Jun 2023 17:37:00 +0000 (10:37 -0700)
commitd97b4111b3228122284df0263200f02fd44751fd
treee235ec3db1ca467337d8ce305ebdba673190aeb5
parent959ffef13bac792e4e2e3321d6e2bd2b00c0f5f9
nvmet-fcloop: Do not wait on completion when unregister fails

The nvme_fc_unregister_localport() returns an error code in case that
the locaport pointer is NULL or has already been unegisterd. localport is
is either in the ONLINE state (all resources allocated) or has already
been put into DELETED state.

In this case we will never receive an wakeup call and thus any caller
will hang, e.g. module unload.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/fcloop.c