diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-17 02:37:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-20 21:29:45 -0400 |
commit | 2226a288fac462ebc98e40da007842f92a7e4799 (patch) | |
tree | c4144c91b7f6830d442486e699b7eb7662a858ce /fs/9p/v9fs.c | |
parent | 01e0fe0b10d8673554525984947cc5de21492462 (diff) |
9p: make register_filesystem() the last failure exit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r-- | fs/9p/v9fs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 1964f98e74be..b85efa773949 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c | |||
@@ -594,21 +594,21 @@ static int __init init_v9fs(void) | |||
594 | int err; | 594 | int err; |
595 | pr_info("Installing v9fs 9p2000 file system support\n"); | 595 | pr_info("Installing v9fs 9p2000 file system support\n"); |
596 | /* TODO: Setup list of registered trasnport modules */ | 596 | /* TODO: Setup list of registered trasnport modules */ |
597 | err = register_filesystem(&v9fs_fs_type); | ||
598 | if (err < 0) { | ||
599 | pr_err("Failed to register filesystem\n"); | ||
600 | return err; | ||
601 | } | ||
602 | 597 | ||
603 | err = v9fs_cache_register(); | 598 | err = v9fs_cache_register(); |
604 | if (err < 0) { | 599 | if (err < 0) { |
605 | pr_err("Failed to register v9fs for caching\n"); | 600 | pr_err("Failed to register v9fs for caching\n"); |
606 | goto out_fs_unreg; | 601 | return err; |
607 | } | 602 | } |
608 | 603 | ||
609 | err = v9fs_sysfs_init(); | 604 | err = v9fs_sysfs_init(); |
610 | if (err < 0) { | 605 | if (err < 0) { |
611 | pr_err("Failed to register with sysfs\n"); | 606 | pr_err("Failed to register with sysfs\n"); |
607 | goto out_cache; | ||
608 | } | ||
609 | err = register_filesystem(&v9fs_fs_type); | ||
610 | if (err < 0) { | ||
611 | pr_err("Failed to register filesystem\n"); | ||
612 | goto out_sysfs_cleanup; | 612 | goto out_sysfs_cleanup; |
613 | } | 613 | } |
614 | 614 | ||
@@ -617,8 +617,8 @@ static int __init init_v9fs(void) | |||
617 | out_sysfs_cleanup: | 617 | out_sysfs_cleanup: |
618 | v9fs_sysfs_cleanup(); | 618 | v9fs_sysfs_cleanup(); |
619 | 619 | ||
620 | out_fs_unreg: | 620 | out_cache: |
621 | unregister_filesystem(&v9fs_fs_type); | 621 | v9fs_cache_unregister(); |
622 | 622 | ||
623 | return err; | 623 | return err; |
624 | } | 624 | } |