mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
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>
This commit is contained in:
parent
959ffef13b
commit
d97b4111b3
@ -1166,7 +1166,8 @@ __wait_localport_unreg(struct fcloop_lport *lport)
|
||||
|
||||
ret = nvme_fc_unregister_localport(lport->localport);
|
||||
|
||||
wait_for_completion(&lport->unreg_done);
|
||||
if (!ret)
|
||||
wait_for_completion(&lport->unreg_done);
|
||||
|
||||
kfree(lport);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user