]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: free the reloc_control in a consistent way
authorJosef Bacik <josef@toxicpanda.com>
Wed, 4 Mar 2020 16:18:26 +0000 (11:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:57 +0000 (17:01 +0100)
commitaa0208d7a71556446a0e0d03dce351d4242e4cf3
tree6a88a2066d1c7b978200019ea52d83c276166047
parent936f952172774f214c1a22bde4855e0db4cc9d27
btrfs: free the reloc_control in a consistent way

If we have an error while processing the reloc roots we could leak roots
that were added to rc->reloc_roots before we hit the error.  We could
have also not removed the reloc tree mapping from our rb_tree, so clean
up any remaining nodes in the reloc root rb_tree.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ use rbtree_postorder_for_each_entry_safe ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c