Message ID | 20240130094938.1575-4-dwagner@suse.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-44305-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1117137dyb; Tue, 30 Jan 2024 02:18:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyswDwSotdZ+Dsy/EdSWjPRMH/m6oYmj2NcjBMuYNND0FgdB4ETB+B9csofUbC9vylS4Hq X-Received: by 2002:a17:902:d489:b0:1d8:d37a:f758 with SMTP id c9-20020a170902d48900b001d8d37af758mr4185670plg.52.1706609890591; Tue, 30 Jan 2024 02:18:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706609890; cv=pass; d=google.com; s=arc-20160816; b=LT0UzLobMWasoztTrLKNgaFUhoZhc3FNugr+I5YVPyk3dmBwPUVrngXYo4dgj4zyVu sExHAFZqJ8FBrKk+cUwHmQEDmXEvwYkGNTJ1D01bFpZ8ck68ot9KdBfip221W1qJSe/O mqAyxcNUKkSpnWKk3VP08/vWLbjxn6HZ0TbplXNC6Xwt5GTCy8AKpq3C3N5W7hFRlTIP ca7wtDxDeknkycHCeHeKVNcw3WtyjHKt3UX9pWNsGkzKhnC8ESilwUF/lQhAQq9d/kJ+ bWnXTZQFUQ5VMeMwqUAqJytVPBArhWYEzf9Mb3hFY08UO4IoWiBq7MDJ1TznDyg/6ajR XQrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Re0MogVOYjaFuNFM2i7Bu+P9ZUOIrofJCkAhcytgCgI=; fh=n5BdL0bf9gAg+lJbD9hdO95/5FlrOLRCMPX4XUPPjVI=; b=Ot6jlG/ylii/y6VABgBb1EOn48DDNKeFeNzqD53NKFEl6dhXJSH9PRTRQTWN1fMAbA qpNQEllVsE2ozkHwO7V4zooMHfUnBcvn1ZbebtGTuxvq1cjdpNFCJMi3BDhmS5oDakSK 0y4TYN80xZhyqo3KSZM8bTYJ+K8K/MrhtLlQfgmu28ay5C01cyKME8YZVL/iltOOx3S+ xqF6Ou65XRmUgdI7K/h1/ly1j+dF8FcyiQfkj1iHt570/tCPo+7vjEAw9+hsPb+NDRei WR4yB4l2KS6EycUOVwpIS5usTAVbji1Ap6vkN/yTxq6MxnhmNCucZ5aadSgJtu/NzIbF PzgQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-44305-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44305-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t3-20020a170902e84300b001d015cec684si40032plg.238.2024.01.30.02.18.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 02:18:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44305-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-44305-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44305-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 142E6B2F891 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 09:52:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7920B67A05; Tue, 30 Jan 2024 09:49:55 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5103A66B24 for <linux-kernel@vger.kernel.org>; Tue, 30 Jan 2024 09:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608193; cv=none; b=m7Wzl9M6GGYxZ09CqnXUyVWlsZtHkvgUUT2wsAQT92tj4h00ytbJKCHyx1NJRQi9+WfYiyxYOp47YQ5b9P9hOLB5thz/0LhTEK1JS5W/laM4upWg37Jxu4/FpQbHU61h1jpjsXBj/fVK4B/Uv0UdcImNgsdepinKogJYPuU8G0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608193; c=relaxed/simple; bh=Lbfj3Z0PTLwuhTwd7V4Bm9MgVroo+VvqDP8UxzsaoIY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=izq6bCe7ssoFa3PcDNHkI+viJ31gt8SsTeDMIdnA0xNGb4rxkuedV196EPBMHOVHXxF/ZBL+GYrWk+vFa0d0n4WD1pifiRKOaYR5kfyq2QsXqsgGb1AxiDNqnsbpwmeyFDG90wJdtL8ICCXDbxaV4cAPYAk1+QMpw2prJb+feNg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C6C0F222DE; Tue, 30 Jan 2024 09:49:49 +0000 (UTC) Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id A7BE61376E; Tue, 30 Jan 2024 09:49:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id EcKBJz3GuGWJbwAAn2gu4w (envelope-from <dwagner@suse.de>); Tue, 30 Jan 2024 09:49:49 +0000 From: Daniel Wagner <dwagner@suse.de> To: James Smart <james.smart@broadcom.com> Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Wagner <dwagner@suse.de> Subject: [PATCH v4 03/12] nvmet-fc: release reference on target port Date: Tue, 30 Jan 2024 10:49:29 +0100 Message-ID: <20240130094938.1575-4-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130094938.1575-1-dwagner@suse.de> References: <20240130094938.1575-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: C6C0F222DE X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789510172808604000 X-GMAIL-MSGID: 1789510172808604000 |
Series |
enable nvmet-fc for blktests
|
|
Commit Message
Daniel Wagner
Jan. 30, 2024, 9:49 a.m. UTC
In case we return early out of __nvmet_fc_finish_ls_req() we still have to release the reference on the target port. Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Daniel Wagner <dwagner@suse.de> --- drivers/nvme/target/fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c index 05e6a755b330..3d53d9dc1099 100644 --- a/drivers/nvme/target/fc.c +++ b/drivers/nvme/target/fc.c @@ -360,7 +360,7 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop) if (!lsop->req_queued) { spin_unlock_irqrestore(&tgtport->lock, flags); - return; + goto out_puttgtport; } list_del(&lsop->lsreq_list); @@ -373,6 +373,7 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop) (lsreq->rqstlen + lsreq->rsplen), DMA_BIDIRECTIONAL); +out_puttgtport: nvmet_fc_tgtport_put(tgtport); }