Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1531676rdb; Wed, 31 Jan 2024 01:09:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDlXjZKM+Ot9WhEjjRR8qBJ2OQBBOWO2Gk6gIh/zd7cvssfvgOE/+vVdax6A4xZzYAz+q4 X-Received: by 2002:a05:6402:31ae:b0:55f:4602:bf93 with SMTP id dj14-20020a05640231ae00b0055f4602bf93mr613566edb.26.1706692161284; Wed, 31 Jan 2024 01:09:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706692161; cv=pass; d=google.com; s=arc-20160816; b=xAdocElgcJWXrgnvg6Dpik86SjNpjt+4hqFAR2zhwhVwcZhTLGicAtBMzoo9wbXzlG eX4mNEMA7/qAahH+c3fNG3W2YRR8FPZh3mfBnhVjs8gvFEZq2J7l8ZQfmNBG/jZAvnYj PeJ69xUhQT7Z40O+AsIjkQHFIpooYiTOYVqONmsKtBx+mMb6KnUe+JRQReBC5J/4aiYn JVRqyn/tYRfxeMWBtNsedeBz5TISGXnyJIxkcD8h9XWiXcpMQKRBC92SMR44ASOIN8N8 DMd906pYSZiO7Ir9pvpiePIJY3zzdmURoUxCIHIri5FIYkHZAQonGcjHw4buYJSYneQ5 cH5Q== 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:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=4TQUSWFdQCtv+1Rn2MqvdEYgTqrHLL1g6ezmsVfSoo8=; fh=+uylfhyiMOU/hiX0fXB1MgKLFiitoejts8uYiIuIh3c=; b=z3zYj3aD+xF/yUpxeUwY6EziAfOXorT3Gmzkj/v+Zl8xomuspq7LJBYBAE6xtn2aQ/ 0nzZYCqbzndIWcpKtrRGwv4AXtHC5u8noWywbbZvP8jF1hbrxgFAcx5E+bEdF/qskvF/ FT331tpFvGfTmUxSv7Xjeq92FWWr8lmX8KUAYCsuzYtTqZfFoeOJCswfAvYL1Ac5PW+q VbkQFNvODuvHwVdjouQaCAi7vGZnDuJgP7uUURRRNZb+sV74OXk4RSTPVpNwd40W4i69 O9AM6tCxXeWOc8raFN8tfhQWerVH/qsXY7w6C++/tYYS1nDe4x4QxzQAEKZngmdgN3Wz PSJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q7l6jVU0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q7l6jVU0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-46068-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de X-Forwarded-Encrypted: i=1; AJvYcCWmCcDXzqeTzGKAZUSbrWgfptD/vn6ADoIYsxdJyZ6Nn42EhkVM37Gmp3q7UPAygbpmXd76Qv03Kru18PxDayPXinGP84HEoO3rMCG7PA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ig15-20020a056402458f00b0055ed836338bsi3813176edb.192.2024.01.31.01.09.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 01:09:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46068-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q7l6jVU0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q7l6jVU0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-46068-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0CD061F2DAFB for ; Wed, 31 Jan 2024 08:58:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC87379DC3; Wed, 31 Jan 2024 08:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q7l6jVU0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="sk0oPjVE"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q7l6jVU0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="sk0oPjVE" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 048127995B for ; Wed, 31 Jan 2024 08:51:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706691086; cv=none; b=jq8IN0/D0vu+GSXU9tr7YBhQIIuknN4aQ8Cf3c5+i/MPD1Ylt6aD5+mJs8519GGIURBC4zDFP4F0x8sFqdvPmBB/3IRsh5bZI0JY5nfqxGItLyaCbC9DDJNwrRk31lVUclUpqiqFSJhERGfnHL8w1eG9pIqLf3iqPeGxK/Ax20w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706691086; c=relaxed/simple; bh=V7Jtpd7lYG148xNcB31HoyqrcoOJtIJD5kaifLwWBTg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TgipGd/X6jYtAehmcWGX96tq9hECGe6gIYz1O+7wFlodnw+BqHq5Z0QwE5xVXZdmHJ0iLrTXQbj+DGkaXfAmlxd6y9xAbFpK7oeNI7ULhMbHZBBnxZoB4F/xISyAxzUCAm0PIfIBxy3GGLUwTgXUinT+8iQ6cc3uNh7DBLJCfns= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Q7l6jVU0; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=sk0oPjVE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Q7l6jVU0; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=sk0oPjVE; arc=none smtp.client-ip=195.135.223.131 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 [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-out2.suse.de (Postfix) with ESMTPS id 39A651FD05; Wed, 31 Jan 2024 08:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706691083; 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=4TQUSWFdQCtv+1Rn2MqvdEYgTqrHLL1g6ezmsVfSoo8=; b=Q7l6jVU00tUnnQX0lIWFHaa2sGIkYUhgNYLgdDzeMhw1cFpwQz7x48UbC4mpV/qvyLLJdf Y6G+s+Umk6dxW8NSXUZN7Af4QRcSiN+Nnt7XOPtjIc4OXB0DJ+L+mJKz9vjyBacaUcM/ZD VN0eiqthmOGV14z9CfN7k6YGwELj9Hs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706691083; 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=4TQUSWFdQCtv+1Rn2MqvdEYgTqrHLL1g6ezmsVfSoo8=; b=sk0oPjVEiZtgmRITqlDTWLlFJi8tw6Bw+QZ/uhlkWg1vZOEFUtTo0aYjOULqj4aeb2DWXO MWPv5ex21JoyPJBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706691083; 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=4TQUSWFdQCtv+1Rn2MqvdEYgTqrHLL1g6ezmsVfSoo8=; b=Q7l6jVU00tUnnQX0lIWFHaa2sGIkYUhgNYLgdDzeMhw1cFpwQz7x48UbC4mpV/qvyLLJdf Y6G+s+Umk6dxW8NSXUZN7Af4QRcSiN+Nnt7XOPtjIc4OXB0DJ+L+mJKz9vjyBacaUcM/ZD VN0eiqthmOGV14z9CfN7k6YGwELj9Hs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706691083; 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=4TQUSWFdQCtv+1Rn2MqvdEYgTqrHLL1g6ezmsVfSoo8=; b=sk0oPjVEiZtgmRITqlDTWLlFJi8tw6Bw+QZ/uhlkWg1vZOEFUtTo0aYjOULqj4aeb2DWXO MWPv5ex21JoyPJBg== 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 27FAE139F5; Wed, 31 Jan 2024 08:51:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id nwxMCAsKumWDHAAAn2gu4w (envelope-from ); Wed, 31 Jan 2024 08:51:23 +0000 From: Daniel Wagner To: James Smart Cc: Keith Busch , Christoph Hellwig , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Wagner Subject: [PATCH v5 03/12] nvmet-fc: release reference on target port Date: Wed, 31 Jan 2024 09:51:03 +0100 Message-ID: <20240131085112.21668-4-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240131085112.21668-1-dwagner@suse.de> References: <20240131085112.21668-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: 0.82 X-Spamd-Result: default: False [0.82 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.88)[99.49%] X-Spam-Flag: NO 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 Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner --- 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); } -- 2.43.0