Commit 2226a288 authored by Al Viro's avatar Al Viro

9p: make register_filesystem() the last failure exit

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 01e0fe0b
...@@ -594,21 +594,21 @@ static int __init init_v9fs(void) ...@@ -594,21 +594,21 @@ static int __init init_v9fs(void)
int err; int err;
pr_info("Installing v9fs 9p2000 file system support\n"); pr_info("Installing v9fs 9p2000 file system support\n");
/* TODO: Setup list of registered trasnport modules */ /* 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(); err = v9fs_cache_register();
if (err < 0) { if (err < 0) {
pr_err("Failed to register v9fs for caching\n"); pr_err("Failed to register v9fs for caching\n");
goto out_fs_unreg; return err;
} }
err = v9fs_sysfs_init(); err = v9fs_sysfs_init();
if (err < 0) { if (err < 0) {
pr_err("Failed to register with sysfs\n"); 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; goto out_sysfs_cleanup;
} }
...@@ -617,8 +617,8 @@ static int __init init_v9fs(void) ...@@ -617,8 +617,8 @@ static int __init init_v9fs(void)
out_sysfs_cleanup: out_sysfs_cleanup:
v9fs_sysfs_cleanup(); v9fs_sysfs_cleanup();
out_fs_unreg: out_cache:
unregister_filesystem(&v9fs_fs_type); v9fs_cache_unregister();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment