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 41C1CC4828F for ; Wed, 7 Feb 2024 21:25:05 +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=9QRoW99BzLHlxkqMAUJIUPA9TAysePWDGybVV5k3fzs=; b=Qd/VUof0Vtn16iZ6UdlfdoAOOF DOQ66rWqZ/hJw4UsoqHB9b2+uHrgKejOOEoDVbYq0gOJt5sGImZF3o6/KQZhKM4/51z4g4eBqAEzI nSuFDSby5NlLXnzDhiy2vSH668L/YOfHJo09hRb07xVz90Pg9Ku89xBjuaYW28beMGEIMmsDpnmze RSqGFGZBEByffG102mlmVyiXfyPLOuryBxTCoe7jnJAfkZ0LANoLlrSmbGohMv6isFHgzzypH86vk 8ElQpjJvz5xOhY6DNCSp0WDyvd4MUOcv9ekx51BZmYB63EvvinmrcWxbGiiXWnQcBsAln5Rn+hvfl 3Vqi7m8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXpPk-0000000Brv1-0tyX; Wed, 07 Feb 2024 21:25:04 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXpPK-0000000Brfd-2Xa2 for linux-nvme@lists.infradead.org; Wed, 07 Feb 2024 21:24:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 92C3ACE1B24; Wed, 7 Feb 2024 21:24:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68396C43390; Wed, 7 Feb 2024 21:24:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707341075; bh=8Zk0CzA0tVU4lBXyhl7hjsNEW2keRPbiMZnj5O9LUXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FeFrvjiTH/a8KBu+XjW9OmjUx0jBT29tRpp6Q+9nvhD/gnNmsvJttzB9Nh1G79Mnm g15JkhVZtCTeUNn95z8oXtFLbqkp1UhYoscr5NIgAeAcR7KVyO66Y8AoIo2ljkkQk/ XEV3A6rXx7fw713j6UbO/cQSW+495ifarMauFpqedyaMh42IBLKhiNO9dvhRgmsm8T GkRqPqelFfrFGlwbCyYyRkU45LG2kf+fE7xGqxfqxRM1HgjSDVw2PN2CR6oKSCBeB+ ERU0xDY0RUuS/CHHd3S0RoNdXnj7/+Va6BmRTXMruV4MIdzkxtj9Q4RQE8S/KydfRX B5UXU2XStpFBw== 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 6.6 28/38] nvmet-fcloop: swap the list_add_tail arguments Date: Wed, 7 Feb 2024 16:23:14 -0500 Message-ID: <20240207212337.2351-28-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207212337.2351-1-sashal@kernel.org> References: <20240207212337.2351-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.16 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240207_132439_008130_B8B12102 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 c65a73433c05..e6d4226827b5 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); queue_work(nvmet_wq, &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); queue_work(nvmet_wq, &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); queue_work(nvmet_wq, &tport->ls_work); return ret; -- 2.43.0