From 226463d7b100d30def24f2be492fef0081003a30 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 14 Sep 2022 11:06:38 -0400 Subject: btrfs: move btrfs_path_cachep out of ctree.h This is local to the ctree code, remove it from ctree.h and inode.c, create new init/exit functions for the cachep, and move it locally to ctree.c. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/super.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'fs/btrfs/super.c') diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 8fe2fdb167a7..9f8b77553de0 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2743,10 +2743,14 @@ static int __init init_btrfs_fs(void) if (err) goto free_cachep; - err = extent_state_init_cachep(); + err = btrfs_ctree_init(); if (err) goto free_transaction; + err = extent_state_init_cachep(); + if (err) + goto free_ctree; + err = extent_buffer_init_cachep(); if (err) goto free_extent_cachep; @@ -2815,6 +2819,8 @@ free_eb_cachep: extent_buffer_free_cachep(); free_extent_cachep: extent_state_free_cachep(); +free_ctree: + btrfs_ctree_exit(); free_transaction: btrfs_transaction_exit(); free_cachep: @@ -2828,6 +2834,7 @@ free_compress: static void __exit exit_btrfs_fs(void) { + btrfs_ctree_exit(); btrfs_transaction_exit(); btrfs_destroy_cachep(); btrfs_delayed_ref_exit(); -- cgit v1.2.3-73-gaa49b