Re: [PATCH v2] ext4: fix buffer_head leak in ext4_init_orphan_info

From: Theodore Ts'o

Date: Thu Jul 23 2026 - 09:11:45 EST



On Thu, 09 Jul 2026 14:41:51 +0000, Guanghui Yang wrote:
> ext4_init_orphan_info() reads orphan file blocks with ext4_bread()
> and stores the returned buffer_head in oi->of_binfo[i].ob_bh.
>
> If ext4_bread() succeeds but the orphan block magic or checksum
> validation fails, the function jumps to out_free. However, the old
> out_free loop starts releasing buffers from i - 1, so the current
> buffer_head at index i is skipped.
>
> [...]

Applied, thanks!

[1/1] ext4: fix buffer_head leak in ext4_init_orphan_info
commit: 05704335803b69c1bfa8637b7ada942bf2ee8a41

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