diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-01-24 09:32:55 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:32 +0100 |
commit | 81f096edf0472864879e1e5a7f0fdf87ea90fe75 (patch) | |
tree | ab31121667e046139480130429cee05d017e5e86 /fs/btrfs/qgroup.c | |
parent | 4c78e9f59632b5e635e51db9b68111288b38ff22 (diff) | |
download | linux-81f096edf0472864879e1e5a7f0fdf87ea90fe75.tar.bz2 |
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/qgroup.c')
-rw-r--r-- | fs/btrfs/qgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index ff1870ff3474..09fc588ab4bf 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1040,7 +1040,7 @@ out_free_root: if (ret) { free_extent_buffer(quota_root->node); free_extent_buffer(quota_root->commit_root); - kfree(quota_root); + btrfs_put_fs_root(quota_root); } out: if (ret) { @@ -1106,7 +1106,7 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info) free_extent_buffer(quota_root->node); free_extent_buffer(quota_root->commit_root); - kfree(quota_root); + btrfs_put_fs_root(quota_root); end_trans: ret = btrfs_end_transaction(trans); |