diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2025-07-23 22:57:16 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-01 09:48:46 +0100 |
| commit | 85defb9933f67a9fb62a4e3e709347239d78f647 (patch) | |
| tree | 7c1c6673386e3d55d5e51461112a60a2ae8df4a1 /include/net/aligned_data.h | |
| parent | 35bd33e3ef090cf2b734d28ce282af093bb2baff (diff) | |
ext4: fix incorrect punch max_end
[ Upstream commit 29ec9bed2395061350249ae356fb300dd82a78e7 ]
For the extents based inodes, the maxbytes should be sb->s_maxbytes
instead of sbi->s_bitmap_maxbytes. Additionally, for the calculation of
max_end, the -sb->s_blocksize operation is necessary only for
indirect-block based inodes. Correct the maxbytes and max_end value to
correct the behavior of punch hole.
Fixes: 2da376228a24 ("ext4: limit length to bitmap_maxbytes - blocksize in punch_hole")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Link: https://patch.msgid.link/20250506012009.3896990-2-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
