From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5393EC4828F for ; Wed, 7 Feb 2024 21:27:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uB1UbsFEAvnWQyVB7djifeAdM+cfGYFyQPSzcGl/T8g=; b=hScZdFkaOlgfWFLlvOTZPCgPLK 409/Y5d3B+o2mRpVTMVvXU/GXibmbBRlW8IIgJ7ktJMJprlxVTiOA6UiuUCqperyznZGH3dClizwt YM66uCABwx9Bp2v+0hVsgvkzFyYlsGF+TZJhNPJyQv935mlKK23v6TJD4D9cPYzN22KlItD02ULqy 7b7UnM4XhB6OLTWFmccETE7Ka3qx3QjXueEMOlll0TQ+y3+nd6Hj+V9iBwcV8YFt3khQWzO7UHEMp AzOwLN+dHRxtNabCPVebg38vPuAvNKrxQBluiwxRNA0o1pvcmGYF6n3JlzXfbOS9jAttJ83WJzf/y YvU80tNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXpSW-0000000Btul-2Ulr; Wed, 07 Feb 2024 21:27:56 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXpRz-0000000BtZP-3eHH for linux-nvme@lists.infradead.org; Wed, 07 Feb 2024 21:27:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E7405CE1B19; Wed, 7 Feb 2024 21:27:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B8FDC433B1; Wed, 7 Feb 2024 21:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707341241; bh=HE+2/YZwBAFE1qqEASLqxzCDA2l+sH7v/e7ET7vufzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y7awp2JczhHvdOKTnsTGiD0cLqFpU4JjeEHrEdf7ZwfBUc94h4w3KDx7spbCSl34J UAw2HKxpowgqKTfuZdYZRmDpSutFhmytZLX+ZFmBGBc8Kv/S0qWU1yEzOsn16DVciF FxkQ9eRdCvrIpSKFEUhFLSk2Yovrw3oP0s60jx4xcLJxZaLJzU8YL47sqrtfMtPZKm uh90ZXWFud8e+N61KCW+kIQT5BN1c6fa1Q1yI7RA+9DFow830e+ecR2Eo/DFSMIQ7I V+wDjbvPVpysqALDwim7aJ+zgV5BVdIIyEVeXrv491bcLzJZEISfZT3p+SJLFDf2uW 82MDHDReJy0HA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Wagner , Christoph Hellwig , Hannes Reinecke , Keith Busch , Sasha Levin , james.smart@broadcom.com, sagi@grimberg.me, kch@nvidia.com, linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 11/16] nvmet-fcloop: swap the list_add_tail arguments Date: Wed, 7 Feb 2024 16:26:51 -0500 Message-ID: <20240207212700.4287-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207212700.4287-1-sashal@kernel.org> References: <20240207212700.4287-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.209 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240207_132724_401006_5D668139 X-CRM114-Status: GOOD ( 11.49 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org From: Daniel Wagner [ Upstream commit dcfad4ab4d6733f2861cd241d8532a0004fc835a ] The first argument of list_add_tail function is the new element which should be added to the list which is the second argument. Swap the arguments to allow processing more than one element at a time. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- drivers/nvme/target/fcloop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c index 80a208fb34f5..f2c5136bf2b8 100644 --- a/drivers/nvme/target/fcloop.c +++ b/drivers/nvme/target/fcloop.c @@ -358,7 +358,7 @@ fcloop_h2t_ls_req(struct nvme_fc_local_port *localport, if (!rport->targetport) { tls_req->status = -ECONNREFUSED; spin_lock(&rport->lock); - list_add_tail(&rport->ls_list, &tls_req->ls_list); + list_add_tail(&tls_req->ls_list, &rport->ls_list); spin_unlock(&rport->lock); schedule_work(&rport->ls_work); return ret; @@ -391,7 +391,7 @@ fcloop_h2t_xmt_ls_rsp(struct nvmet_fc_target_port *targetport, if (remoteport) { rport = remoteport->private; spin_lock(&rport->lock); - list_add_tail(&rport->ls_list, &tls_req->ls_list); + list_add_tail(&tls_req->ls_list, &rport->ls_list); spin_unlock(&rport->lock); schedule_work(&rport->ls_work); } @@ -446,7 +446,7 @@ fcloop_t2h_ls_req(struct nvmet_fc_target_port *targetport, void *hosthandle, if (!tport->remoteport) { tls_req->status = -ECONNREFUSED; spin_lock(&tport->lock); - list_add_tail(&tport->ls_list, &tls_req->ls_list); + list_add_tail(&tls_req->ls_list, &tport->ls_list); spin_unlock(&tport->lock); schedule_work(&tport->ls_work); return ret; -- 2.43.0