diff options
| author | Josef Bacik <[email protected]> | 2020-01-24 14:32:55 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2020-03-23 16:01:32 +0000 |
| commit | 81f096edf0472864879e1e5a7f0fdf87ea90fe75 (patch) | |
| tree | ab31121667e046139480130429cee05d017e5e86 /fs/btrfs/tests/btrfs-tests.c | |
| parent | btrfs: hold a ref on the root in open_ctree (diff) | |
| download | kernel-81f096edf0472864879e1e5a7f0fdf87ea90fe75.tar.gz kernel-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 <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
| -rw-r--r-- | fs/btrfs/tests/btrfs-tests.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index 84fb3fa940a6..5efd8000e65b 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -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 * |
