diff options
author | Daniel Wagner <wagi@kernel.org> | 2025-05-07 14:23:06 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2025-05-20 05:34:27 +0200 |
commit | 3466b7a6b713071190888526d3b9c58cda60b55f (patch) | |
tree | 8cfb2d86394fa99ecf1274e4f64a9a8ac75e0ea1 | |
parent | d7f7c6eb809ae36466a503b20689956b86e13827 (diff) |
nvmet-fcloop: don't wait for lport cleanup
The lifetime of the fcloop_lsreq is not tight to the lifetime of the
host or target port, thus there is no need anymore to synchronize the
cleanup path anymore.
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/nvme/target/fcloop.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c index bac60c6de6cf..257b497d515a 100644 --- a/drivers/nvme/target/fcloop.c +++ b/drivers/nvme/target/fcloop.c @@ -207,7 +207,6 @@ static LIST_HEAD(fcloop_nports); struct fcloop_lport { struct nvme_fc_local_port *localport; struct list_head lport_list; - struct completion unreg_done; refcount_t ref; }; @@ -1092,9 +1091,6 @@ fcloop_localport_delete(struct nvme_fc_local_port *localport) struct fcloop_lport_priv *lport_priv = localport->private; struct fcloop_lport *lport = lport_priv->lport; - /* release any threads waiting for the unreg to complete */ - complete(&lport->unreg_done); - fcloop_lport_put(lport); } @@ -1243,18 +1239,9 @@ out_free_lport: } static int -__wait_localport_unreg(struct fcloop_lport *lport) +__localport_unreg(struct fcloop_lport *lport) { - int ret; - - init_completion(&lport->unreg_done); - - ret = nvme_fc_unregister_localport(lport->localport); - - if (!ret) - wait_for_completion(&lport->unreg_done); - - return ret; + return nvme_fc_unregister_localport(lport->localport); } static struct fcloop_nport * @@ -1337,7 +1324,7 @@ fcloop_delete_local_port(struct device *dev, struct device_attribute *attr, if (!lport) return -ENOENT; - ret = __wait_localport_unreg(lport); + ret = __localport_unreg(lport); fcloop_lport_put(lport); return ret ? ret : count; @@ -1783,7 +1770,7 @@ static void __exit fcloop_exit(void) spin_unlock_irqrestore(&fcloop_lock, flags); - ret = __wait_localport_unreg(lport); + ret = __localport_unreg(lport); if (ret) pr_warn("%s: Failed deleting local port\n", __func__); |