Files
linux/fs/btrfs
Zilin Guan a5b44895da btrfs: release root after error in data_reloc_print_warning_inode()
commit c367af440e upstream.

data_reloc_print_warning_inode() calls btrfs_get_fs_root() to obtain
local_root, but fails to release its reference when paths_from_inode()
returns an error. This causes a potential memory leak.

Add a missing btrfs_put_root() call in the error path to properly
decrease the reference count of local_root.

Fixes: b9a9a85059 ("btrfs: output affected files when relocation fails")
CC: stable@vger.kernel.org # 6.6+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-11-24 10:37:48 +01:00
..
2024-03-04 16:24:46 +01:00
2025-07-22 00:09:20 +02:00
2025-07-21 23:58:01 +02:00
2025-07-22 00:05:00 +02:00