summaryrefslogtreecommitdiff
path: root/fs/btrfs/free-space-tree.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-01-24 09:32:55 -0500
committerDavid Sterba <dsterba@suse.com>2020-03-23 17:01:32 +0100
commit81f096edf0472864879e1e5a7f0fdf87ea90fe75 (patch)
treeab31121667e046139480130429cee05d017e5e86 /fs/btrfs/free-space-tree.c
parent4c78e9f59632b5e635e51db9b68111288b38ff22 (diff)
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.c2
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);