Re: [PATCH v5] ext4: avoid infinite loops caused by residual data

From: Theodore Ts'o

Date: Fri Mar 27 2026 - 00:07:44 EST



On Fri, 06 Mar 2026 09:31:58 +0800, Edward Adam Davis wrote:
> On the mkdir/mknod path, when mapping logical blocks to physical blocks,
> if inserting a new extent into the extent tree fails (in this example,
> because the file system disabled the huge file feature when marking the
> inode as dirty), ext4_ext_map_blocks() only calls ext4_free_blocks() to
> reclaim the physical block without deleting the corresponding data in
> the extent tree. This causes subsequent mkdir operations to reference
> the previously reclaimed physical block number again, even though this
> physical block is already being used by the xattr block. Therefore, a
> situation arises where both the directory and xattr are using the same
> buffer head block in memory simultaneously.
>
> [...]

Applied, thanks!

[1/1] ext4: avoid infinite loops caused by residual data
commit: 86709d389530941e5816505e3c12c757ceca374d

Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>