diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-14 11:06:37 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:37 +0100 |
commit | 956504a331a613814279b04f9b0d663c7c2bb9bc (patch) | |
tree | 9b55ec7c35796aadb5fc214d8fcad1f1ed28ce0b /fs/btrfs/super.c | |
parent | f60acad355cf14ccccf420e6ea0ddd6de87cb210 (diff) |
btrfs: move trans_handle_cachep out of ctree.h
This is local to the transaction code, remove it from ctree.h and
inode.c, create new helpers in the transaction to handle the init work
and move the cachep locally to transaction.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 5942b9384088..8fe2fdb167a7 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2739,10 +2739,14 @@ static int __init init_btrfs_fs(void) if (err) goto free_compress; - err = extent_state_init_cachep(); + err = btrfs_transaction_init(); if (err) goto free_cachep; + err = extent_state_init_cachep(); + if (err) + goto free_transaction; + err = extent_buffer_init_cachep(); if (err) goto free_extent_cachep; @@ -2811,6 +2815,8 @@ free_eb_cachep: extent_buffer_free_cachep(); free_extent_cachep: extent_state_free_cachep(); +free_transaction: + btrfs_transaction_exit(); free_cachep: btrfs_destroy_cachep(); free_compress: @@ -2822,6 +2828,7 @@ free_compress: static void __exit exit_btrfs_fs(void) { + btrfs_transaction_exit(); btrfs_destroy_cachep(); btrfs_delayed_ref_exit(); btrfs_auto_defrag_exit(); |