]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nvmet-fcloop: add missing fcloop_callback_host_done
authorDaniel Wagner <wagi@kernel.org>
Wed, 7 May 2025 12:23:02 +0000 (14:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 20 May 2025 03:34:26 +0000 (05:34 +0200)
Add the missing fcloop_call_host_done calls so that the caller
frees resources when something goes wrong.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/fcloop.c

index 4c60eaf0b653b9d86e91e48e520d525a58b7688c..bac60c6de6cf16e59a1245263bba3971e97cabf0 100644 (file)
@@ -1002,9 +1002,10 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
        }
        spin_unlock(&inireq->inilock);
 
-       if (!tfcp_req)
+       if (!tfcp_req) {
                /* abort has already been called */
-               return;
+               goto out_host_done;
+       }
 
        /* break initiator/target relationship for io */
        spin_lock_irqsave(&tfcp_req->reqlock, flags);
@@ -1019,7 +1020,7 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
        default:
                spin_unlock_irqrestore(&tfcp_req->reqlock, flags);
                WARN_ON(1);
-               return;
+               goto out_host_done;
        }
        spin_unlock_irqrestore(&tfcp_req->reqlock, flags);
 
@@ -1033,6 +1034,11 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
                 */
                fcloop_tfcp_req_put(tfcp_req);
        }
+
+       return;
+
+out_host_done:
+       fcloop_call_host_done(fcpreq, tfcp_req, -ECANCELED);
 }
 
 static void