Commit f2326fd
ext4: preserve SB_I_VERSION on remount
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 1ff2030 ("ext4: unconditionally enable the
i_version counter") removing the fix from commit 960e0ab ("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: 1ff2030 ("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>1 parent 6a912e8 commit f2326fd
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1998 | 1998 | | |
1999 | 1999 | | |
2000 | 2000 | | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
2001 | 2004 | | |
2002 | 2005 | | |
2003 | 2006 | | |
| |||
5316 | 5319 | | |
5317 | 5320 | | |
5318 | 5321 | | |
5319 | | - | |
5320 | | - | |
5321 | | - | |
5322 | 5322 | | |
5323 | 5323 | | |
5324 | 5324 | | |
| |||
0 commit comments