Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5373711rwe; Tue, 18 Apr 2023 06:09:44 -0700 (PDT) X-Google-Smtp-Source: AKy350aoOGgm8W8juIJyY1+hI66rymTZTzQJOBm03BvkKmNQaB0JwbXQZ/GaBmmrHc8H25TbkZ5o X-Received: by 2002:a17:90a:ca94:b0:246:cac9:330d with SMTP id y20-20020a17090aca9400b00246cac9330dmr2036998pjt.8.1681823384362; Tue, 18 Apr 2023 06:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681823384; cv=none; d=google.com; s=arc-20160816; b=LGw7NGL0C5zYo6K7lpiK6HlKJUGUops0nn8MvUgKqxb2tRe3bmfM85cCiVKn3/NoWm /N0NvPI8fXqS2K+kDjBVqmVcO7hweyRtx9QyBiaKWWID6G/n4Vxlp8PVtaPJjTgSimm1 4GbaKYvfRauPTBoDFwU/KaM12bVcViJbRPcjWgU0Gan/48VXWVTs6/yGV0HthtzbDE3Q 6zV5GPOW5F5BZEMl3cGa1gbg4d0Fu0/RoQ8LJbMOqxdfNdmcF4emN662kXoNk2BL7gHE F3PrHBa1fFHu67eOGML5HWuzKiNtrxd5+aLgSYgmQAaUtM+MWHq8r7rhYuZD6plLgRQW b4xA== 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=erHAoiCu4jj2Ch2tHHXmBJtIpayCyfyp+ThMN07KkPXjMKRZjmKV5nsG2oFTw3SV8A KA4byhXYNvM1vA+YLUJIVEkcEFfiA2+6MVMV5stQkn4EsQrH1lT8r1AwJX/Ydl/wQ+bL UrguRZQT4h9e0+sIVZNu5/IKA75rUx0aH00BNbSaDWZF6nUzMqIyEpcLTU97WsAApYKg 6Lrab6SMypDhKuEINuUnCNqkvU06BJjqiLeJh83nyETfZ6721E/gLYm5nyB5NIEQmBwF RkSjV3QXo6kem7+xsI4+2RvMr3pqOArgyaDh8hwr+OwPVPuhoqc1uFeA6grLdcZgSRn4 fZrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=m4dN3zHb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Eu5bdJz+; 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 gq1-20020a17090b104100b00242bface51csi13507425pjb.108.2023.04.18.06.09.33; Tue, 18 Apr 2023 06:09:44 -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=m4dN3zHb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Eu5bdJz+; 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 S232365AbjDRNCk (ORCPT + 99 others); Tue, 18 Apr 2023 09:02:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232341AbjDRNCX (ORCPT ); Tue, 18 Apr 2023 09:02:23 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A79AC140; Tue, 18 Apr 2023 06:02:13 -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 583772198D; Tue, 18 Apr 2023 13:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681822932; 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=m4dN3zHb/zbBb6KD/8nwFZcUptHzIHM08HbBQITK+/s96hkdRAB8nTZxX1aOgwx4lUeGur rOXTUaHfqzGXqbxfpy+R/0muoO2/CuvHblkltgBf+iAAcjqEyduK2UybDRbja++lnzOwYQ N7hUtYxA2i4yoA2+3ZikUumbAF+BwOk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681822932; 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=Eu5bdJz+i0cTxM/ZzsknJ8+gQU297t32ycgeZ12JWAIvPnhulke5ZodY5vqscwKpKsB0NJ bnlqu005LfMEBUAg== 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 49D58139CC; Tue, 18 Apr 2023 13:02:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CtbPEdSUPmSVJwAAMHmgww (envelope-from ); Tue, 18 Apr 2023 13:02:12 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Sagi Grimberg , James Smart , Chaitanya Kulkarni , Martin Belanger , Shinichiro Kawasaki , Daniel Wagner Subject: [PATCH v3 4/4] nvmet-fc: Release reference on target port Date: Tue, 18 Apr 2023 15:01:59 +0200 Message-Id: <20230418130159.11075-5-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418130159.11075-1-dwagner@suse.de> References: <20230418130159.11075-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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