From nobody Mon Feb 9 17:23:55 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABCAD2397B4 for ; Wed, 26 Feb 2025 18:46:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740595584; cv=none; b=uPKufKoWTuAUquR/YbKvHpWxQFjIIGB4E/U51vMyEMoGKFruTkkAC2mdGs6dDZTf+ZAfTI28of4oknuRdIqlWz/PXPLdLhOaulXeZcKu2aaEkPTPcfz/XoUyfiBESsbnk2KKAZs9UQaV3V2iOAgI0DjMhSN1JePxRQ5ZAeXB+eU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740595584; c=relaxed/simple; bh=J6AUMJGnaDgNqGbm3jWxZfLL/F5J/3cqMBGDn8TxEhU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HagxXijL4JYGdy2r1b47Lf3IanJ6jC0xgkQOMC1yGpkwEJueKlu094vBwbmI28og0OFWSjq+ztqnQadNMFl2KS+pRLtPtL67kPiZfpTIf4Xp987LtFiFBeTjvXCUWD01gP5les+Yd7x5AYTW4EvqgzIKdAFZj06kKiSmyjj2PW8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kSVuxNPs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kSVuxNPs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34F2AC4CEEA; Wed, 26 Feb 2025 18:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740595584; bh=J6AUMJGnaDgNqGbm3jWxZfLL/F5J/3cqMBGDn8TxEhU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kSVuxNPsr5z8gfv9sJnCSxMOn+PWP4P+YDtvlktP6ScmbMxgDBaNrzz9Q07Pn7ZQE pwUlgw/TVx7Kv5tYf6IGsEpAQaTx9+/BRsbhZA+OcLiiyW1I4TNjMd65o9mqLwcwaE I5eR3wVxFGSrT8BqHtK4KmNmYgFFQlodkWkW/LL6kta96lvFSrgVRKT0AoijUxJTey ofCBjfdtdvvPBS11BETaVNzn/ugQ4Hp8JTFgoYJIIHgCgTkt1pEqHoQZJR0ZArHz4J gkc26nTWMd3gvh7qI9poiRsrE1i6Ij7g1+a1IkmqnfXmvmAJ9MHQCl4HWlJ/0swl7F Soj5jWtWNqWnA== From: Daniel Wagner Date: Wed, 26 Feb 2025 19:46:03 +0100 Subject: [PATCH 11/11] nvmet-fc: inline nvmet_fc_free_hostport Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250226-nvmet-fcloop-v1-11-c0bd83d43e6a@kernel.org> References: <20250226-nvmet-fcloop-v1-0-c0bd83d43e6a@kernel.org> In-Reply-To: <20250226-nvmet-fcloop-v1-0-c0bd83d43e6a@kernel.org> To: James Smart , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni Cc: Hannes Reinecke , Keith Busch , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Wagner X-Mailer: b4 0.14.2 No need for this tiny helper with only user, let's inline it. And since the hostport ref counter needs to stay in sync, it's not optional anymore to give back the reference. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke --- drivers/nvme/target/fc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c index fcf191aa1c6bf73e7fb84213bbb7eb76a486734f..f42f7c674f69b87a43bf06639a8= da60d14a48509 100644 --- a/drivers/nvme/target/fc.c +++ b/drivers/nvme/target/fc.c @@ -1009,16 +1009,6 @@ nvmet_fc_hostport_get(struct nvmet_fc_hostport *host= port) return kref_get_unless_zero(&hostport->ref); } =20 -static void -nvmet_fc_free_hostport(struct nvmet_fc_hostport *hostport) -{ - /* if LLDD not implemented, leave as NULL */ - if (!hostport || !hostport->hosthandle) - return; - - nvmet_fc_hostport_put(hostport); -} - static struct nvmet_fc_hostport * nvmet_fc_match_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle) { @@ -1187,7 +1177,7 @@ nvmet_fc_target_assoc_free(struct kref *ref) /* Send Disconnect now that all i/o has completed */ nvmet_fc_xmt_disconnect_assoc(assoc); =20 - nvmet_fc_free_hostport(assoc->hostport); + nvmet_fc_hostport_put(assoc->hostport); spin_lock_irqsave(&tgtport->lock, flags); oldls =3D assoc->rcv_disconn; spin_unlock_irqrestore(&tgtport->lock, flags); --=20 2.48.1