Files
linux-stable-mirror/fs/ext4
Baokun LiandGreg Kroah-Hartman 342f7a1dda ext4: preserve SB_I_VERSION on remount
[ Upstream commit f2326fd14a ]

IMA testing revealed that after an ext4 remount, file accesses triggered
full measurements even without modifications, instead of skipping as
expected when i_version is unchanged.

Debugging showed `SB_I_VERSION` was cleared in reconfigure_super() during
remount due to commit 1ff2030739 ("ext4: unconditionally enable the
i_version counter") removing the fix from commit 960e0ab63b ("ext4: fix
i_version handling on remount").

To rectify this, `SB_I_VERSION` is always set for `fc->sb_flags` in
ext4_init_fs_context(), instead of `sb->s_flags` in __ext4_fill_super(),
ensuring it persists across all mounts.

Cc: stable@kernel.org
Fixes: 1ff2030739 ("ext4: unconditionally enable the i_version counter")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250703073903.6952-2-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[ Adjust context ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:28:44 +02:00
..
2025-06-04 14:41:57 +02:00
2025-06-27 11:08:47 +01:00
2025-06-27 11:08:47 +01:00
2025-06-27 11:08:47 +01:00
2024-12-09 10:32:42 +01:00
2025-04-25 10:45:27 +02:00
2025-08-28 16:28:44 +02:00
2025-04-25 10:45:16 +02:00