summaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-03-17 02:37:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:45 -0400
commit2226a288fac462ebc98e40da007842f92a7e4799 (patch)
treec4144c91b7f6830d442486e699b7eb7662a858ce /fs/9p
parent01e0fe0b10d8673554525984947cc5de21492462 (diff)
downloadop-kernel-dev-2226a288fac462ebc98e40da007842f92a7e4799.zip
op-kernel-dev-2226a288fac462ebc98e40da007842f92a7e4799.tar.gz
9p: make register_filesystem() the last failure exit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/v9fs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 1964f98..b85efa7 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -594,21 +594,21 @@ static int __init init_v9fs(void)
int err;
pr_info("Installing v9fs 9p2000 file system support\n");
/* TODO: Setup list of registered trasnport modules */
- err = register_filesystem(&v9fs_fs_type);
- if (err < 0) {
- pr_err("Failed to register filesystem\n");
- return err;
- }
err = v9fs_cache_register();
if (err < 0) {
pr_err("Failed to register v9fs for caching\n");
- goto out_fs_unreg;
+ return err;
}
err = v9fs_sysfs_init();
if (err < 0) {
pr_err("Failed to register with sysfs\n");
+ goto out_cache;
+ }
+ err = register_filesystem(&v9fs_fs_type);
+ if (err < 0) {
+ pr_err("Failed to register filesystem\n");
goto out_sysfs_cleanup;
}
@@ -617,8 +617,8 @@ static int __init init_v9fs(void)
out_sysfs_cleanup:
v9fs_sysfs_cleanup();
-out_fs_unreg:
- unregister_filesystem(&v9fs_fs_type);
+out_cache:
+ v9fs_cache_unregister();
return err;
}
OpenPOWER on IntegriCloud