Re: [PATCH] xfs: fix memory leak for data allocated by xfs_zone_gc_data_alloc()

From: Carlos Maiolino

Date: Mon Apr 27 2026 - 09:30:38 EST


On Fri, 17 Apr 2026 12:16:30 +1000, Wilfred Mallawa wrote:
> In xfs_zone_gc_mount(), on error, a struct xfs_zone_gc_data allocated
> with xfs_zone_gc_data_alloc() is freed with kfree(), however, this
> doesn't free the underlying folios or the rmap_irecs.
>
> Use xfs_zone_gc_data_free() to correctly free this memory.
>
>
> [...]

Applied to for-next, thanks!

[1/1] xfs: fix memory leak for data allocated by xfs_zone_gc_data_alloc()
commit: af47a4be6a90c8bfc874f9994ac9c15813b9718b

Best regards,
--
Carlos Maiolino <cem@xxxxxxxxxx>