Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5408455rwl; Tue, 11 Apr 2023 05:11:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ZIFJxRhP+YkbMs5CkVEcmefJQbkLDplOQwlqBCMzlaStRPF/pmGGpgpkAu/R8RDOWXbSXu X-Received: by 2002:a05:6a20:ba90:b0:db:9726:8e46 with SMTP id fb16-20020a056a20ba9000b000db97268e46mr10464078pzb.54.1681215077272; Tue, 11 Apr 2023 05:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681215077; cv=none; d=google.com; s=arc-20160816; b=pEVZxBkUbQJPetU+638IXl1cQknhwuhjuzr3/6T0etCYsZVFLRQbgCsEPof8rbqbue gUH8EIRaJk86e2fZ1431pht5itTC0Dsv4/TJe/fcWjGoYryYaaa3mCMtUhpMotKsx/gD gpp7Ws9OoGeE1Eu3amljf52AZjC5Vlx6OTru+eglq8mEUGDmZEGr978Ha8/Ibjbz9J5a 9hZkIChm1DC/+5n08rlR55qyGbzOI3+B+SgOF7hCqKFoVgem4WvdwBsT6eH1TuJ0+B9g Y99/DJz3ImB6X+w0i2iJqIluQrtXJP7DOcEii6fwdEXtFD4oIils1jBwLJESBVahsyWi awLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=ZY9sxvj6D4iXpgx1qxODzCgmh0MIsy7/YXUSzF3Zq2Y=; b=y5BIBEjVmGQE8nVVMxg+S39KlN6Rv6o/Bw+Nd1wksRg9UF9zm5ooiP4AIxkAWfBAxz i/bknO+z6m43PWNEMkjon5xMd86JopJYzLsWu+X7834Ik0czczwnE4r688w4a3wMnEQi kOvrRwBAwnOleqfaIuIk76T+h0jTx+YMlJOQJRPwqiK/i6PV/DPD24+01qRSFXd/EdFp NyBuTpegaRdD/kqXcb4MHS8nmUa8DrhcDhivjjAMJie3DkvlGjcT5nc6W/jnQUil0mTV M0/aeay+4f6YhMo1i8I83yn9p5gsy3s4S9WqaEY6CvqZhqHuNlbsocKU1quyGkMGf8bV 8GIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gBCkQ4ZL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=xMyg7CAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a624d04000000b005a908acf445si13706536pfb.101.2023.04.11.05.11.03; Tue, 11 Apr 2023 05:11:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gBCkQ4ZL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=xMyg7CAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229651AbjDKMHi (ORCPT + 99 others); Tue, 11 Apr 2023 08:07:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbjDKMH3 (ORCPT ); Tue, 11 Apr 2023 08:07:29 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3268E2683 for ; Tue, 11 Apr 2023 05:07:29 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DD8FA21A25; Tue, 11 Apr 2023 12:07:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681214847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZY9sxvj6D4iXpgx1qxODzCgmh0MIsy7/YXUSzF3Zq2Y=; b=gBCkQ4ZLZxayb71eCIDQnysn6YnItRU6c27BhG6V5/G/PeoLnTkGWDyGHjQhPbnXETEMNG zqyFTIH3Z3uDw3wYlfwOJaskNwIaSRB42y9EYj93Wo+TTKLNItgGu2YFfz/s2+0+Vj6ro2 qkvCGiKrtZIZaWZvyFGgrY8pANtXd7w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681214847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZY9sxvj6D4iXpgx1qxODzCgmh0MIsy7/YXUSzF3Zq2Y=; b=xMyg7CATI2PxiwVfoaahdv9aFMKEKhDvu+p4Ra3nm/+sg4nwuhgU5cEAQtmCSSQrkKSzxS VvaXSuLVm1Nq6eDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D265A13638; Tue, 11 Apr 2023 12:07:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JVtcM39NNWSABgAAMHmgww (envelope-from ); Tue, 11 Apr 2023 12:07:27 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Sagi Grimberg , James Smart , Chaitanya Kulkarni , Daniel Wagner Subject: [PATCH v2 4/4] nvmet-fc: Release reference on target port Date: Tue, 11 Apr 2023 14:07:18 +0200 Message-Id: <20230411120718.14477-5-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230411120718.14477-1-dwagner@suse.de> References: <20230411120718.14477-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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