Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2621796lqo; Tue, 14 May 2024 04:41:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCsOLuvhZyUDgn62qV8aMs1gudSg4aqSI88oJBndYkBe+Wn6N6xp2PWfrTVJAJ+PvPpRektnBF93yqnnYDacU84Svr8K39hw6HMUET9Q== X-Google-Smtp-Source: AGHT+IESI4jP7jhOZlJ0HT0LHrgv/wLYq84qY/Lr6NffpscEB9DbCOkmuC7IlDcbYhL1ZzL1HU+l X-Received: by 2002:a17:902:6903:b0:1e6:40f1:935e with SMTP id d9443c01a7336-1ef43e29ac3mr113058365ad.35.1715686880897; Tue, 14 May 2024 04:41:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715686880; cv=pass; d=google.com; s=arc-20160816; b=ZiZokih7dZ9o4rv9jwBYmoIxdb+61Iblnw84QZcrNCqCo3Dp9QvfSmk/y03X3ildsN J7ga8V+wyu4itsqHs6LlwBZ7CvrZtOgL7UlLdU//2vhsb/VuvYjDiMVnlg5PIPAUjaMu 7vkuDObFOe2bXNA5G9rySRhQo+SBpRuMvMAB/qDO8qP3vhIugiiZNI41MQ2VzVRCfP8f NAFVa7Yxzsqem4oBc6hM6p6NZi/cK7Z02jqvWt1HvnUNWYAINRFWKTwLIvJPGEh9DExE oLJEM55OsCbQ/vlIUXDX14i/J+/V5IOvrNcY0PIhsVP55MpBOu3eFswtr6NfEvzQSp8r UrQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=615OIYdMKUSX/alzqVz0CzGcCK5Wm5RIvWC+yHvzC+g=; fh=pf8pn/cVufM2NIipJP2kqbdMWZvciRNVzwZXvJNpV+Q=; b=EZbgvn0OgBOf79L3rNGFdUcq3U///lSAAPLmuF6ni5ghDBIBHTYswZMBZRTPD2VaJH 85cB/VQrZacvJVe9/DQsEK87rWCIQh++nNDA/g2kizihYS8lc+RpWsy7qLod/P1vngj9 RW0HBnZ+cKEeQhzw4K/tuieDtqW7nPmkWPliMg0gwWe/wblmiFgFJmKu4j9LqN7nDZex ijJPNej+lttcvB+4tvBXdzQ8UxPNAMATmSs06rY3RtzIRKhvypk0roO6XyQAsUCtmhWF cdoCpjYStWKKY56jmL3m32JHQJJcvwYQ9xvCM2d/G8n4h6nQ1VV6onqKwlQPYsIelxOJ KYuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2503-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c160895si115441385ad.536.2024.05.14.04.41.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 04:41:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2503-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5EEEEB216C5 for ; Tue, 14 May 2024 11:38:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A44213DDB7; Tue, 14 May 2024 11:25:21 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (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 021DE13D529; Tue, 14 May 2024 11:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715685920; cv=none; b=qIe4Hz7MnjJg1IJPnTV7HPIqzyNKWLWbfzDQX3z4Wous+fK6hcKMsUhEvqekpNg++Ynheh8CDwk6X4y+2FeFsfSxsX5uQfw6+n4bQrc8QfDASnOYpDe2UZHAa2VNkUTdBZp2vx/Pag/NXS3/VEMUTkuseWfBo7eWuBsfRCbS0co= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715685920; c=relaxed/simple; bh=bY+OOgiAJEGfkk4Jf6QWrQFRo5ckZfSugccFHm15y6E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U13ixK3qnibLoWzslcM40NmKGF7Dhb1HyLZK563rienQ0BwLyUWBGS/V3fcteK8QlfEI/xg2oWCrxp6chUjZhxdpW78rn1n09lXe65L7e45mSXtSNdDqKdDLXDKFXSkYoVLaISi7/EPn2AUUQ7ki/266iwMZOTfPoBbX9IsqA8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VdvCp2X3Cz4f3kJr; Tue, 14 May 2024 19:25:10 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id DAC191A0572; Tue, 14 May 2024 19:25:15 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP3 (Coremail) with SMTP id _Ch0CgCHSKAXSkNm4rTMMQ--.61831S10; Tue, 14 May 2024 19:25:15 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, jack@suse.com, yi.zhang@huaweicloud.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 8/9] jbd2: remove dead check of JBD2_UNMOUNT in kjournald2 Date: Tue, 14 May 2024 19:24:37 +0800 Message-Id: <20240514112438.1269037-9-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240514112438.1269037-1-shikemeng@huaweicloud.com> References: <20240514112438.1269037-1-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:_Ch0CgCHSKAXSkNm4rTMMQ--.61831S10 X-Coremail-Antispam: 1UD129KBjvdXoWrZF15WF4DJFy8AFWxXryrJFb_yoWfGrg_XF WFyrsrZ39xtr47JFWSy3y3Wr1rtrn7Zr18Zwn2q34qkw1UJa47JFsrXrWY9ry5ua1vqrWY 93WIka18Kr9FqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbTxFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2 IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28E F7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr 1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0D M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxAIw28IcxkI7VAKI48JMx C20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAF wI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20x vE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v2 0xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxV W8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbmZX7UUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ We always set JBD2_UNMOUNT with j_state_lock held in journal_kill_thread. In kjournald2, we check JBD2_UNMOUNT flag two times under the same j_state_lock. Then the second check is unnecessary. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara --- fs/jbd2/journal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 4f1ab68cdb6f..59bff0b75ce7 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -228,8 +228,6 @@ static int kjournald2(void *arg) if (transaction && time_after_eq(jiffies, transaction->t_expires)) should_sleep = 0; - if (journal->j_flags & JBD2_UNMOUNT) - should_sleep = 0; if (should_sleep) { write_unlock(&journal->j_state_lock); schedule(); -- 2.30.0