From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4C50141995; Tue, 27 Feb 2024 14:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709044014; cv=none; b=azFoj19zOnQBjZnGVVltqnd/Z/8pLM/E0X5m+0NI6fiE9IzFlyVVr9yKsFR0UaKbigSL0rAnBkEkx4P/TimgOLTUSkxe0FkKYUk8LUPt0UBSxeDkfxnJ5fgN/gcwOv/KqKKlT/S1NN/g3WdrL4aEfGxQvbDunYl4FWyAB9OqDgY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709044014; c=relaxed/simple; bh=EJN30xKTNn3Ij4G/AUl4m04vgqCGn3TFNitIoaq3HGU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FP9fCd/e7aUE6psQr5srGT4Qk2XXzskuKCtymOiYkTbUiE/TjpvTzLpnJkad8BqxQP9TCwo3wmMfqBA3m5Zc/UPAKDp55deY22vaknUVUk2nhIv9RpYqT8UeshNBGjwoc0QbgaxBG+UWlTX62dbPSG29Cnws4MXBL52+OI7zEA4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yhCxnN11; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yhCxnN11" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E12EC43390; Tue, 27 Feb 2024 14:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709044014; bh=EJN30xKTNn3Ij4G/AUl4m04vgqCGn3TFNitIoaq3HGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yhCxnN11qKBotkXLrjfNn5OJonP5/kU0g3iUnguZEJFY6t7EUOragTuP1eLXgYHCJ RjTFSbTJdC5BRja4YVSyxfjjYSaLPTYKqLGYyNqAVeVc3PyCALljEIL3b9e0z9tVal YECCzyHywlqEOj0SMmX5Y34XtRt7z+Iv/amvuR7w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , Hannes Reinecke , Daniel Wagner , Keith Busch , Sasha Levin Subject: [PATCH 5.10 031/122] nvmet-fcloop: swap the list_add_tail arguments Date: Tue, 27 Feb 2024 14:26:32 +0100 Message-ID: <20240227131559.726206415@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131558.694096204@linuxfoundation.org> References: <20240227131558.694096204@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ 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 80a208fb34f52..f2c5136bf2b82 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