On 2025/4/30 11:20, Matthew Wilcox wrote: > On Wed, Apr 30, 2025 at 09:13:01AM +0800, Zhang Yi wrote: >> From: Zhang Yi <yi.zhang@xxxxxxxxxx> >> >> The inode i_size cannot be larger than maxbytes, check it while loading >> inode from the disk. > > With this patch, why do we need patch 1? The max_end in ext4_punch_hole() is maxbytes - blocksize. Therefore, without the patch 1, it is still possible to encounter a negative length if the offset exceeds max_end but is less than an i_size that also exceeds max_end. max_end i_size max_bytes | | | 0------------------------------------ | offset Thanks, Yi.