diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-14 11:06:39 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:37 +0100 |
commit | eda517fd0ceee0329bb956f701c0e124fc1fe269 (patch) | |
tree | b73ea67a4396f92e13041c34ad767a17b4de8e8c /fs/btrfs/super.c | |
parent | 226463d7b100d30def24f2be492fef0081003a30 (diff) |
btrfs: move free space cachep's out of ctree.h
This is local to the free-space-cache.c code, remove it from ctree.h and
inode.c, create new init/exit functions for the cachep, and move it
locally to free-space-cache.c.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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/super.c')
-rw-r--r-- | fs/btrfs/super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9f8b77553de0..0a93fbd29494 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2747,10 +2747,14 @@ static int __init init_btrfs_fs(void) if (err) goto free_transaction; - err = extent_state_init_cachep(); + err = btrfs_free_space_init(); if (err) goto free_ctree; + err = extent_state_init_cachep(); + if (err) + goto free_free_space; + err = extent_buffer_init_cachep(); if (err) goto free_extent_cachep; @@ -2819,6 +2823,8 @@ free_eb_cachep: extent_buffer_free_cachep(); free_extent_cachep: extent_state_free_cachep(); +free_free_space: + btrfs_free_space_exit(); free_ctree: btrfs_ctree_exit(); free_transaction: @@ -2834,6 +2840,7 @@ free_compress: static void __exit exit_btrfs_fs(void) { + btrfs_free_space_exit(); btrfs_ctree_exit(); btrfs_transaction_exit(); btrfs_destroy_cachep(); |