diff options
author | Wyatt Banks <wyatt@banksresearch.com> | 2007-11-19 10:22:33 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:58 -0400 |
commit | 2f4cbe6442d3be7b5e4cf1607a5ab33995fe2d25 (patch) | |
tree | a2c1554296d2d8252fb1748dd06c589572e5be54 /fs/btrfs/super.c | |
parent | 3acd7ee876c508973eb4722de5b00b3dff4c7372 (diff) |
Btrfs: Return value checking in module init
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 21 |
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 | |||
360 | free_extent_map: | ||
361 | extent_map_exit(); | ||
362 | free_cachep: | ||
363 | btrfs_destroy_cachep(); | ||
364 | free_transaction_sys: | ||
365 | btrfs_exit_transaction_sys(); | ||
366 | btrfs_exit_sysfs(); | ||
367 | return err; | ||
353 | } | 368 | } |
354 | 369 | ||
355 | static void __exit exit_btrfs_fs(void) | 370 | static void __exit exit_btrfs_fs(void) |