Re: [PATCH] xfs: fix memory leak in xfs_dqinode_metadir_create()

From: Carlos Maiolino

Date: Wed Jul 01 2026 - 09:27:18 EST


On Sat, 27 Jun 2026 14:04:02 +0800, Dawei Feng wrote:
> If xfs_metadir_create() fails in xfs_dqinode_metadir_create(), the current
> code returns directly, leaking the allocated update and transaction state.
> If the subsequent commit fails, the caller-owned inode reference is left
> behind.
>
> Fix this memory leak by routing the create failure path through
> xfs_metadir_cancel(). For both create and commit failures, finish and
> release any inode returned to the caller, mirroring the unwind pattern in
> xfs_metadir_mkdir().
>
> [...]

Applied to for-next, thanks!

[1/1] xfs: fix memory leak in xfs_dqinode_metadir_create()
commit: 45de375b25060edf46e20abb36521ba530336ceb

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