Re: [PATCH v2] ext4: detect invalid INLINE_DATA + EXTENTS flag combination

From: Deepanshu Kartikey

Date: Tue Sep 30 2025 - 05:02:44 EST


Zhang Yi,

Thank you for the review. Regarding the placement after ext4_set_inode_flags() -
this would be too early. My debug shows that i_inline_off changes during inode
initialization:

After ext4_set_inode_flags(): flag=1, i_inline_off=0, has_inline=0
Before my patch validation check: flag=1, i_inline_off=164, has_inline=1

At the earlier point, ext4_has_inline_data() returns false, so we wouldn't catch
the corruption. The check needs to be after all inode fields are initialized.

I'll fix the alignment and use function/line variables as you suggested, but keep
the check after "ret = 0;" where all inode fields are populated.

I'll send v3 with these fixes shortly.

Best regards,
Deepanshu