[PATCH v3 08/18] nvmet-fcloop: add missing fcloop_callback_host_done
From: Daniel Wagner
Date: Tue Mar 18 2025 - 06:41:51 EST
Add the missing fcloop_call_host_done calls so that the caller
frees resources when something goes wrong.
Signed-off-by: Daniel Wagner <wagi@xxxxxxxxxx>
---
drivers/nvme/target/fcloop.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index cadf081e3653c641b0afcb0968fc74299ab941d1..de23f0bc5599b6f8dd5c3713dd38c952e6fdda28 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -966,9 +966,11 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
}
spin_unlock(&inireq->inilock);
- if (!tfcp_req)
+ if (!tfcp_req) {
/* abort has already been called */
+ fcloop_call_host_done(fcpreq, tfcp_req, -ECANCELED);
return;
+ }
/* break initiator/target relationship for io */
spin_lock_irqsave(&tfcp_req->reqlock, flags);
@@ -982,6 +984,7 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
break;
default:
spin_unlock_irqrestore(&tfcp_req->reqlock, flags);
+ fcloop_call_host_done(fcpreq, tfcp_req, -ECANCELED);
WARN_ON(1);
return;
}
--
2.48.1