linux-stable/fs/ext4
Baokun Li 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
..
.kunitconfig
acl.c
acl.h
balloc.c ext4: reorder capability check last 2025-06-04 14:41:57 +02:00
bitmap.c
block_validity.c ext4: make block validity check resistent to sb bh corruption 2025-05-02 07:51:00 +02:00
crypto.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4: factor out ext4_get_maxbytes() 2025-06-27 11:08:47 +01:00
extents_status.c
extents_status.h
extents.c ext4: factor out ext4_get_maxbytes() 2025-06-27 11:08:47 +01:00
fast_commit.c
fast_commit.h
file.c ext4: factor out ext4_get_maxbytes() 2025-06-27 11:08:47 +01:00
fsmap.c ext4: fix reserved gdt blocks handling in fsmap 2025-08-28 16:28:34 +02:00
fsmap.h
fsync.c
hash.c
ialloc.c
indirect.c ext4: fix hole length calculation overflow in non-extent inodes 2025-08-28 16:28:34 +02:00
inline.c ext4: do not BUG when INLINE_DATA_FL lacks system.data xattr 2025-08-28 16:28:25 +02:00
inode-test.c
inode.c ext4: check fast symlink for ea_inode correctly 2025-08-28 16:28:34 +02:00
ioctl.c
Kconfig
Makefile
mballoc.c ext4: fix largest free orders lists corruption on mb_optimize_scan switch 2025-08-28 16:28:30 +02:00
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4: fix off-by-one error in do_split 2025-04-25 10:45:27 +02:00
orphan.c ext4: use kmalloc_array() for array space allocation 2025-08-28 16:28:34 +02:00
page-io.c ext4: do not convert the unwritten extents if data writeback fails 2025-06-04 14:41:59 +02:00
readpage.c
resize.c
super.c ext4: preserve SB_I_VERSION on remount 2025-08-28 16:28:44 +02:00
symlink.c
sysfs.c
truncate.h
verity.c
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: ignore xattrs past end 2025-04-25 10:45:16 +02:00
xattr.h