linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Sagi Grimberg <sagi@grimberg.me>,
	James Smart <james.smart@broadcom.com>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Martin Belanger <Martin.Belanger@dell.com>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Daniel Wagner <dwagner@suse.de>
Subject: [PATCH v3 4/4] nvmet-fc: Release reference on target port
Date: Tue, 18 Apr 2023 15:01:59 +0200	[thread overview]
Message-ID: <20230418130159.11075-5-dwagner@suse.de> (raw)
In-Reply-To: <20230418130159.11075-1-dwagner@suse.de>

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@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


  parent reply	other threads:[~2023-04-18 13:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 13:01 [PATCH v3 0/4] nvmet-fcloop: unblock module removal Daniel Wagner
2023-04-18 13:01 ` [PATCH v3 1/4] nvmet-fcloop: Remove remote port from list when unlinking Daniel Wagner
2023-04-18 13:01 ` [PATCH v3 2/4] nvmet-fcloop: Do not wait on completion when unregister fails Daniel Wagner
2023-04-18 13:01 ` [PATCH v3 3/4] nvmet-fc: Do not wait in vain when unloading module Daniel Wagner
2023-04-18 13:01 ` Daniel Wagner [this message]
2023-04-18 13:43 ` [PATCH v3 0/4] nvmet-fcloop: unblock module removal Daniel Wagner
2023-04-18 14:26   ` Daniel Wagner
2023-04-19  9:03     ` Daniel Wagner
2023-04-19  9:35   ` Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230418130159.11075-5-dwagner@suse.de \
    --to=dwagner@suse.de \
    --cc=Martin.Belanger@dell.com \
    --cc=james.smart@broadcom.com \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=shinichiro.kawasaki@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).