summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 8b52c69fda2e..f8a1016600b1 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -468,10 +468,15 @@ static int __init init_btrfs_fs(void)
err = btrfs_init_cachep();
if (err)
goto free_transaction_sys;
- err = extent_map_init();
+
+ err = extent_io_init();
if (err)
goto free_cachep;
+ err = extent_map_init();
+ if (err)
+ goto free_extent_io;
+
err = register_filesystem(&btrfs_fs_type);
if (err)
goto free_extent_map;
@@ -479,6 +484,8 @@ static int __init init_btrfs_fs(void)
free_extent_map:
extent_map_exit();
+free_extent_io:
+ extent_io_exit();
free_cachep:
btrfs_destroy_cachep();
free_transaction_sys:
@@ -492,6 +499,7 @@ static void __exit exit_btrfs_fs(void)
btrfs_exit_transaction_sys();
btrfs_destroy_cachep();
extent_map_exit();
+ extent_io_exit();
unregister_filesystem(&btrfs_fs_type);
btrfs_exit_sysfs();
}