]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ext4: remove page offset calculation in ext4_block_truncate_page()
authorBaokun Li <libaokun1@huawei.com>
Fri, 21 Nov 2025 09:06:32 +0000 (17:06 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 29 Nov 2025 03:35:26 +0000 (22:35 -0500)
commitb73f45a32420a8393e92fb2dec3b7d109e565127
tree685e744341c739883a405311ce66b950acfc1fbb
parent5835b1339e33549d9e7342fae56243b4fcd758c9
ext4: remove page offset calculation in ext4_block_truncate_page()

For bs <= ps scenarios, calculating the offset within the block is
sufficient. For bs > ps, an initial page offset calculation can lead to
incorrect behavior. Thus this redundant calculation has been removed.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Message-ID: <20251121090654.631996-3-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c