diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-01-24 15:32:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:32 +0100 |
commit | 81f096edf0472864879e1e5a7f0fdf87ea90fe75 (patch) | |
tree | ab31121667e046139480130429cee05d017e5e86 /fs/btrfs/free-space-tree.c | |
parent | btrfs: hold a ref on the root in open_ctree (diff) | |
download | linux-81f096edf0472864879e1e5a7f0fdf87ea90fe75.tar.xz linux-81f096edf0472864879e1e5a7f0fdf87ea90fe75.zip |
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>
Diffstat (limited to 'fs/btrfs/free-space-tree.c')
-rw-r--r-- | fs/btrfs/free-space-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c index 258cb3fae17a..c79804c30b17 100644 --- a/fs/btrfs/free-space-tree.c +++ b/fs/btrfs/free-space-tree.c @@ -1253,7 +1253,7 @@ int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info) free_extent_buffer(free_space_root->node); free_extent_buffer(free_space_root->commit_root); - kfree(free_space_root); + btrfs_put_fs_root(free_space_root); return btrfs_commit_transaction(trans); |