[PATCH v3 4/4] nvmet-fc: Release reference on target port
Daniel Wagner
dwagner at suse.de
Tue Apr 18 06:01:59 PDT 2023
In case we return early out of __nvmet_fc_finish_ls_req() we still have
to release the reference on the target port.
Signed-off-by: Daniel Wagner <dwagner at suse.de>
---
drivers/nvme/target/fc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index 1ab6601fdd5c..df7d84aff843 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -359,6 +359,7 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop)
if (!lsop->req_queued) {
spin_unlock_irqrestore(&tgtport->lock, flags);
+ nvmet_fc_tgtport_put(tgtport);
return;
}
--
2.40.0
More information about the Linux-nvme
mailing list