ext4: reject the 'commit' option on ext2 filesystems
authorEric Biggers <ebiggers@google.com>
Tue, 10 May 2022 18:32:32 +0000 (11:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:00 +0000 (10:23 +0200)
commita11f4f01885a8a138c5fb850ae5915774f5d5136
tree3d30337e39b6f08ed51f4c6e202cb7a9006258b9
parent9ebbfa73d69909b7c737f599fd4ebd42318fc881
ext4: reject the 'commit' option on ext2 filesystems

[ Upstream commit cb8435dc8ba33bcafa41cf2aa253794320a3b8df ]

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 <ebiggers@google.com>
Reviewed-by: Ritesh Harjani <ritesh.list@gmail.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Link: https://lore.kernel.org/r/20220510183232.172615-1-ebiggers@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/super.c