Re: [PATCH] btrfs: Fix local_root reference leak in scrub_print_warning_inode()
From: David Sterba
Date: Mon Sep 21 2026 - 08:31:13 EST
On Wed, Sep 16, 2026 at 05:16:10PM +0000, Wentao Liang wrote:
> When paths_from_inode() fails, scrub_print_warning_inode() jumps to
> err without dropping the reference taken by btrfs_get_fs_root(),
> leaking a reference to the root every time path resolution fails while
> printing scrub warnings. Every other error and success path of the
> function drops the reference.
>
> Drop the reference on the paths_from_inode() failure path too.
>
> Fixes: 558540c17771 ("btrfs scrub: print paths of corrupted files")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Added to for-next, thanks.