aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index c46bc3911798..ffa02872c4d6 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -347,9 +347,24 @@ static int __init init_btrfs_fs(void)
347 btrfs_init_transaction_sys(); 347 btrfs_init_transaction_sys();
348 err = btrfs_init_cachep(); 348 err = btrfs_init_cachep();
349 if (err) 349 if (err)
350 return err; 350 goto free_transaction_sys;
351 extent_map_init(); 351 err = extent_map_init();
352 return register_filesystem(&btrfs_fs_type); 352 if (err)
353 goto free_cachep;
354
355 err = register_filesystem(&btrfs_fs_type);
356 if (err)
357 goto free_extent_map;
358 return 0;
359
360free_extent_map:
361 extent_map_exit();
362free_cachep:
363 btrfs_destroy_cachep();
364free_transaction_sys:
365 btrfs_exit_transaction_sys();
366 btrfs_exit_sysfs();
367 return err;
353} 368}
354 369
355static void __exit exit_btrfs_fs(void) 370static void __exit exit_btrfs_fs(void)