super.c (ed0dab6b86cee64e9072107f65fa40629f162b38) super.c (d1310b2e0cd98eb1348553e69b73827b436dca7b)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 454 unchanged lines hidden (view full) ---

463 err = btrfs_init_sysfs();
464 if (err)
465 return err;
466
467 btrfs_init_transaction_sys();
468 err = btrfs_init_cachep();
469 if (err)
470 goto free_transaction_sys;
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 454 unchanged lines hidden (view full) ---

463 err = btrfs_init_sysfs();
464 if (err)
465 return err;
466
467 btrfs_init_transaction_sys();
468 err = btrfs_init_cachep();
469 if (err)
470 goto free_transaction_sys;
471 err = extent_map_init();
471
472 err = extent_io_init();
472 if (err)
473 goto free_cachep;
474
473 if (err)
474 goto free_cachep;
475
476 err = extent_map_init();
477 if (err)
478 goto free_extent_io;
479
475 err = register_filesystem(&btrfs_fs_type);
476 if (err)
477 goto free_extent_map;
478 return 0;
479
480free_extent_map:
481 extent_map_exit();
480 err = register_filesystem(&btrfs_fs_type);
481 if (err)
482 goto free_extent_map;
483 return 0;
484
485free_extent_map:
486 extent_map_exit();
487free_extent_io:
488 extent_io_exit();
482free_cachep:
483 btrfs_destroy_cachep();
484free_transaction_sys:
485 btrfs_exit_transaction_sys();
486 btrfs_exit_sysfs();
487 return err;
488}
489
490static void __exit exit_btrfs_fs(void)
491{
492 btrfs_exit_transaction_sys();
493 btrfs_destroy_cachep();
494 extent_map_exit();
489free_cachep:
490 btrfs_destroy_cachep();
491free_transaction_sys:
492 btrfs_exit_transaction_sys();
493 btrfs_exit_sysfs();
494 return err;
495}
496
497static void __exit exit_btrfs_fs(void)
498{
499 btrfs_exit_transaction_sys();
500 btrfs_destroy_cachep();
501 extent_map_exit();
502 extent_io_exit();
495 unregister_filesystem(&btrfs_fs_type);
496 btrfs_exit_sysfs();
497}
498
499module_init(init_btrfs_fs)
500module_exit(exit_btrfs_fs)
501
502MODULE_LICENSE("GPL");
503 unregister_filesystem(&btrfs_fs_type);
504 btrfs_exit_sysfs();
505}
506
507module_init(init_btrfs_fs)
508module_exit(exit_btrfs_fs)
509
510MODULE_LICENSE("GPL");