btrfs: use btrfs_put_fs_root to free roots always
If we are going to track leaked roots we need to free them all the same way, so don't kfree() roots directly, use btrfs_put_fs_root. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
4c78e9f596
commit
81f096edf0
@@ -227,7 +227,7 @@ void btrfs_free_dummy_root(struct btrfs_root *root)
|
||||
/* One for allocate_extent_buffer */
|
||||
free_extent_buffer(root->node);
|
||||
}
|
||||
kfree(root);
|
||||
btrfs_put_fs_root(root);
|
||||
}
|
||||
|
||||
struct btrfs_block_group *
|
||||
|
Reference in New Issue
Block a user