Files
linux/fs
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
..
2025-06-10 22:21:16 -04:00
2025-06-11 13:41:05 -04:00
2025-09-26 10:14:19 +02:00
2025-10-29 14:10:32 +01:00
2025-10-19 16:37:06 +02:00
2025-10-29 14:10:15 +01:00
2025-10-19 16:37:44 +02:00
2025-10-19 16:37:44 +02:00
2025-06-29 19:03:46 -04:00
2025-05-23 14:20:44 +02:00