Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5327369rwe; Tue, 18 Apr 2023 05:34:02 -0700 (PDT) X-Google-Smtp-Source: AKy350ZpWgmyhPu1EHWsMghzNG9RqiHmuurHjLcIMyL4rorgs6MjbHxD9e8CsoOuH3KBqcCC7G/+ X-Received: by 2002:a05:6a00:1146:b0:632:d45b:4d3e with SMTP id b6-20020a056a00114600b00632d45b4d3emr25706595pfm.2.1681821241752; Tue, 18 Apr 2023 05:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681821241; cv=none; d=google.com; s=arc-20160816; b=ynuA6Wjq58HQGRE4H8KB0PgrdMa0ECaoAI/d6P0qRQt9rXWrF+aBFBh5QifbCqWWEL ce1mCPmUs+kbfqTWFHUh6P8dnWjNR9wsE6aUHcV4uIZjIUGWg3IZEM5dF8Zps3+mwsW1 L4xUfhniVbXJNFdD5lhHXbqJvEm9lyqVPZgwqybUk5AhIWXIQznIxmVE8WngBuY6c0Lg m4pNuY/AEbYXCzGi8G56IX9ZUtJvGqvdqxbhs0b0QJDi5uHLopTAjZFGd8SOxt/Qdxo3 a6BLRRLKc3tzG1GAEZ+laSXXBzmnNZjFMP7Kz79DxVicWyDTr4EKtKIKtI3cAr27LHdo xGeg== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=TKANE2bTfIsb9mX4f2a9ewBTW7h0uoTrVWYzSg0VVIE=; b=XlH6dkRUSG0s4nsPmg3IVj2iiHtTSv+r5+2JIsgImTUROKviVdxRccXRbKYLKky1rp 6yuYaPGBWG+AzBhkoZxgdFoafZfx4H1lrsunQS8nSu+SEYT5vI+8NyPpRvufxarzCwLu 0u926uycEL2/ax+YHGiScnfKw/U+jbzr7SO5SQD0MCRjSyhQahUoIbqhQd4b//KeAKHr pXGmelp7MMmZMiybmjZGXSdYwYD1JTnZe1pVf0RYCMwrfNoYXDkTFgjoIuJ6By/QPyJJ 91CM+o8iSY2eSYKd9//v90jKpl+hWETZsf/EJORGjXugP/QUMC2GFa0RijQ0YhrfCYHA 28rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AaCaJCo3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 k24-20020a63f018000000b00502e7159b0fsi14258990pgh.175.2023.04.18.05.33.49; Tue, 18 Apr 2023 05:34:01 -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=AaCaJCo3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S231659AbjDRMdf (ORCPT + 99 others); Tue, 18 Apr 2023 08:33:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231549AbjDRMda (ORCPT ); Tue, 18 Apr 2023 08:33:30 -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 5BDDE10243; Tue, 18 Apr 2023 05:33:08 -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 899EE1FD65; Tue, 18 Apr 2023 12:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681821186; 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; bh=TKANE2bTfIsb9mX4f2a9ewBTW7h0uoTrVWYzSg0VVIE=; b=AaCaJCo36MWVmb5P4KbEspPvTBse5UObHptMB3rNppGTDR0aDEcmAWuOCrjkJkXkBW9uRM mWCf/u7WUzNTz/u1Fi7wV0jQvNYOfyzftIgfhsWsGA1IxTwmYH6grMyZs8r4AMk8QEqE2Z vxphRCzZvUAtEOz5MLpap436Uc6z6fM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681821186; 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; bh=TKANE2bTfIsb9mX4f2a9ewBTW7h0uoTrVWYzSg0VVIE=; b=8SNKKT7SExK2ZZZ1METk30iTpWGh8sQdgOh6sVDpIZRILkMI3vNPgm0YPeP/zUGJQ5GixI NdvmvxpiC/YZzJBg== 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 77ECA139CC; Tue, 18 Apr 2023 12:33:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id PTU9HQKOPmROFgAAMHmgww (envelope-from ); Tue, 18 Apr 2023 12:33:06 +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 , Daniel Wagner Subject: [PATCH blktests] nvme-rc: Cleanup fcloop resources in reverse order Date: Tue, 18 Apr 2023 14:32:52 +0200 Message-Id: <20230418123252.3725-1-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 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,URIBL_BLOCKED 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 We need to free the resources in the opposite order as we allocate them. The deleting the rport first will also free the other resources. When we try to release lport and tport they are already gone. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index b44239446dcf..ec0cc2d8d8cc 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -204,10 +204,10 @@ _cleanup_fcloop() { local remote_wwnn="${3:-$def_remote_wwnn}" local remote_wwpn="${4:-$def_remote_wwpn}" - _nvme_fcloop_del_rport "${local_wwnn}" "${local_wwpn}" \ - "${remote_wwnn}" "${remote_wwpn}" _nvme_fcloop_del_tport "${remote_wwnn}" "${remote_wwpn}" _nvme_fcloop_del_lport "${local_wwnn}" "${local_wwpn}" + _nvme_fcloop_del_rport "${local_wwnn}" "${local_wwpn}" \ + "${remote_wwnn}" "${remote_wwpn}" } _cleanup_nvmet() { -- 2.40.0