Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp881531rwd; Thu, 15 Jun 2023 03:29:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7braN5gS59DKomtsG1/FjTNeoIWnI+AfxXDTkrBjckuNN0gGPkii4hX5xUbQwkkWZ5yXTi X-Received: by 2002:a17:902:d4cb:b0:1b1:9f8a:6c18 with SMTP id o11-20020a170902d4cb00b001b19f8a6c18mr17703906plg.25.1686824971721; Thu, 15 Jun 2023 03:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686824971; cv=none; d=google.com; s=arc-20160816; b=SwXAtgV96g6aisUt6bnWD22BFbtemURVmbRK8Y5jRce7iv96+FlRlsIzai2XXqfF1p Y4mJFUYh2aldfhN+npqqTZmBd1cOFNSGOwsyDF8GN5PBc3f3txKk7FEtxpneW/X9ZIsH C6y0/EcUDSU4SevnhjdaqMLYscK4MyXYuhNhssLf1HF5vNFmC6a5+b8P2Vlr+RNoGid3 XscAXKvBMgd+1OL0Y8l67HXMsTYE+yYYlWZCLC35stbujVkLBnCDfs1p/lSmMYFiv5M6 6tq5a3lc3WjD4ymmBqkD0cADpYviCsxkAvJ8MNQf/cuyIbH1K2imdZX02C69yPvbGHOJ uxaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=tG8pGAGsxgP19yxF+JW7yvQPBg+DLxUUomBg/8BjMaU=; b=P8+11PNEUBrGLLfOFMmp3z1lM2B9lxDeM7rcfH+EQxYmCO7dvT2dHwE54x9jBbm0rh gl0WD0LqvP5vkw8KcDS7bENlvHHRruz8TLC++YVFLsm+O2CeTE5hJYA6In1ygT2L1wvM Dlai44aWI0QA3gtxyijD6aGnZYwzwFb639/jV5TxVZS/JZ05M+zUQm9nPbC35qyJ9cnz E3sjHvWcMZbFTvuz5baJn0sljdcK4LUjFstMpDLvomCD8rYwA2hMivvATYOqwXCLUkaA GE7E/5zkv6BA1YXrFwZ3eCoPH49Gytvnkt0us1PsLN+e7nZeOYH6ja3UottAeUSS26wA I62Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=q8Qfwk+T; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=hKoWk3hr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170902d48700b001b39ba93c77si10523739plg.36.2023.06.15.03.29.19; Thu, 15 Jun 2023 03:29:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=q8Qfwk+T; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=hKoWk3hr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244312AbjFOJoZ (ORCPT + 99 others); Thu, 15 Jun 2023 05:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241647AbjFOJoI (ORCPT ); Thu, 15 Jun 2023 05:44:08 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EE5D2705; Thu, 15 Jun 2023 02:44:05 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CE1091FE00; Thu, 15 Jun 2023 09:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686822243; 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=tG8pGAGsxgP19yxF+JW7yvQPBg+DLxUUomBg/8BjMaU=; b=q8Qfwk+Tf0/IUGyq6EL3XWZxicfEcOwoA38N/gMU3zGs2aiDXHDOir7bzkgTpgCGCnkaMQ Hy5+XzIHIIVbXHkB1K7ILhGRtPFlMXwpnMbbsOQlAiUCYonLj0H7m7bEJfidwzbmdaKBfY cIrmjc+0iah2wt3kNZ2VZG693l0euQE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686822243; 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=tG8pGAGsxgP19yxF+JW7yvQPBg+DLxUUomBg/8BjMaU=; b=hKoWk3hr4gN7JBPXcGK7zNfgG99MhxR/28v/qtQ5+CBr8hciMbnSaN0TpzxgwpTnkhiaiP 0DBL9iO9TqUJhtAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C0CA213A47; Thu, 15 Jun 2023 09:44:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UyMQL2PdimRYWgAAMHmgww (envelope-from ); Thu, 15 Jun 2023 09:44:03 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Chaitanya Kulkarni , Shin'ichiro Kawasaki , Sagi Grimberg , Hannes Reinecke , James Smart , Daniel Wagner Subject: [PATCH v1 2/2] nvme-fcloop: queue work items correctly Date: Thu, 15 Jun 2023 11:43:56 +0200 Message-Id: <20230615094356.14878-3-dwagner@suse.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230615094356.14878-1-dwagner@suse.de> References: <20230615094356.14878-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The arguments passed to list_add_tail are reversed. The new element is first argument and the queue/list is the second one. Fixes: 38803fcffb5b ("nvme-fcloop: fix deallocation of working context") Fixes: 437c0b824dbd ("nvme-fcloop: add target to host LS request support") Cc: James Smart Signed-off-by: Daniel Wagner --- drivers/nvme/target/fcloop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c index c65a73433c05..4b35bdcac185 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; @@ -478,7 +478,7 @@ fcloop_t2h_xmt_ls_rsp(struct nvme_fc_local_port *localport, if (targetport) { tport = targetport->private; 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); } -- 2.40.1