Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6208953iob; Tue, 10 May 2022 12:54:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMW+63GuZ4R3haYrPQRqHO51FQkJhjS6TelsFifWXqkF3JyLCtPQzwn4uYznqR+Jg1+bYg X-Received: by 2002:a17:90b:3506:b0:1dc:72c6:384d with SMTP id ls6-20020a17090b350600b001dc72c6384dmr1475004pjb.137.1652212445297; Tue, 10 May 2022 12:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652212445; cv=none; d=google.com; s=arc-20160816; b=sA8NQgF41HaByT+lmkPVKAE8aGPZN1yPgb7sM4zgfIu7gzcA2y4c/4FnnUe3CyTVTz 6rrP1HeEHGDPA+Ucg4pFa5ftIpwI4w6MTSSEkb47g+dHtsQoC2TdGKVFosctW/rh7lHu w/z6410VGhjJ3Pw8zXBDuPh2/oiw9Jzlvu3sejAK6jKUraBzP8gxs6y/74nqjuYO9x/X N9pDuAmsvN4s8VqKxRaFksv5Dv8DhRXdL39dMFCXyapObyQ2Kj3TOkqsXX2LG5Hx763Q dSKaejbuPKpwubpoYvg4igEPtPGn8CRHIGyPEiwoht8WBJg4kyiZFLu6F74NK85mb1M2 2AAg== 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; bh=Vi4SF3vjXJ/5L3fKBFihaLy451jFLl02ElnX0vDgXWU=; b=Sx6zhVXJsl9KOG3UFO5IEjsVqD6lq7t493/qDJzTpCpP6W+kCIqHFqORTCHxCqfCOV gTGoNlEvmVaNS0zrXYrRdboPDemLyR2ylg/GEdWmHjVnIsFa0sMR+90mhp+M/FSlLqHB c+vupZSf9OWOM4FolMBQGUCWfHxWyX9gpTNCwj6RlV+xDTOv+/uLRPgRyQPLzpwWaWfk Feg9IeY4AdrQCOJ/Prz79MZa5HHe5RNKNnqBv7R1CPVS7S+nhQQgm5ALMnWZa32ZCvmB xs4lwXSeBFkdfBymx8LniOVTjk1J7lAXxQ2PL+Fi36TZBcv7vBUfxvfSbmIIHABhnfe8 7OWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b8kPAjox; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a654601000000b003aa5923f7f0si249821pgq.127.2022.05.10.12.53.45; Tue, 10 May 2022 12:54:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@kernel.org header.s=k20201202 header.b=b8kPAjox; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343655AbiEJSdR (ORCPT + 99 others); Tue, 10 May 2022 14:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243656AbiEJSdP (ORCPT ); Tue, 10 May 2022 14:33:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E120E522F9; Tue, 10 May 2022 11:33:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7E18760C6B; Tue, 10 May 2022 18:33:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8AB9C385A6; Tue, 10 May 2022 18:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652207593; bh=ccKR1Zfp7al/CzwoPIKOXL0ali/Vti4d4eC/NrVDCts=; h=From:To:Cc:Subject:Date:From; b=b8kPAjoxv68W5NPtzpDytz7+snjiKpSPEWmYd8sp+lXJmo9zYulVv3ztN0xkdAqnC Ro57BIV9kNy0/gI4HGBcjYnoK8Afqn955XEt1fjNNnkcqRUXGqmExd284/KKyrj4kn n2vPfMTe+jq4+ZrKXqxqB2mcp5R92bl/ZM/0g4Xn/aLlxwsjG+o0VQUtyBYeY3Pu1U wiarJcEZUGYbRbwcKiCgcdRWU7sWYTl6ATQRz/XRiBUYUFdyoj/i6j1x3hfMnQVIG6 KTvtA93gyOmRL7fUTcB/8/5+z51qisSIWvfkmOodqTc39U6jaG6xuqDfv6mgI9uAoB IVaKEkn3DNb2w== From: Eric Biggers To: linux-ext4@vger.kernel.org Cc: fstests@vger.kernel.org, Lukas Czerner Subject: [PATCH] ext4: reject the 'commit' option on ext2 filesystems Date: Tue, 10 May 2022 11:32:32 -0700 Message-Id: <20220510183232.172615-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-ext4@vger.kernel.org From: Eric Biggers The 'commit' option is only applicable for ext3 and ext4 filesystems, and has never been accepted by the ext2 filesystem driver, so the ext4 driver shouldn't allow it on ext2 filesystems. This fixes a failure in xfstest ext4/053. Fixes: 8dc0aa8cf0f7 ("ext4: check incompatible mount options while mounting ext2/3") Signed-off-by: Eric Biggers --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1847b46af8083..69d67724df24f 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1913,6 +1913,7 @@ static const struct mount_opts { MOPT_EXT4_ONLY | MOPT_CLEAR}, {Opt_warn_on_error, EXT4_MOUNT_WARN_ON_ERROR, MOPT_SET}, {Opt_nowarn_on_error, EXT4_MOUNT_WARN_ON_ERROR, MOPT_CLEAR}, + {Opt_commit, 0, MOPT_NO_EXT2}, {Opt_nojournal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM, MOPT_EXT4_ONLY | MOPT_CLEAR}, {Opt_journal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM, base-commit: 23e3d7f7061f8682c751c46512718f47580ad8f0 -- 2.36.1