summaryrefslogtreecommitdiff
path: root/fs/orangefs/orangefs-mod.c
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2016-03-14 15:30:39 -0400
committerMike Marshall <hubcap@omnibond.com>2016-03-14 15:48:28 -0400
commit2180c52cc72993b3b097573aaa550f273f795c8a (patch)
treea68459be5a0284947331fd86855a6b858730e1a9 /fs/orangefs/orangefs-mod.c
parenta7d3e78ab53ff479fee3ad5a674a74c54c337b3b (diff)
Orangefs: fix sloppy cleanups of debugfs and sysfs init failures.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-mod.c')
-rw-r--r--fs/orangefs/orangefs-mod.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c
index 91a4293d1cd7..abc41fa2d2c4 100644
--- a/fs/orangefs/orangefs-mod.c
+++ b/fs/orangefs/orangefs-mod.c
@@ -185,22 +185,39 @@ static int __init orangefs_init(void)
*/
ret = orangefs_prepare_debugfs_help_string(1);
if (ret)
- goto out;
+ goto prepare_helpstring_failed;
+
+ ret = orangefs_debugfs_init();
+ if (ret)
+ goto debugfs_init_failed;
- orangefs_debugfs_init();
- orangefs_kernel_debug_init();
- orangefs_sysfs_init();
+ ret = orangefs_kernel_debug_init();
+ if (ret)
+ goto kernel_debug_init_failed;
+
+ ret = orangefs_sysfs_init();
+ if (ret)
+ goto sysfs_init_failed;
ret = register_filesystem(&orangefs_fs_type);
if (ret == 0) {
pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
- return 0;
+ ret = 0;
+ goto out;
}
- orangefs_debugfs_cleanup();
orangefs_sysfs_exit();
fsid_key_table_finalize();
+sysfs_init_failed:
+
+kernel_debug_init_failed:
+
+debugfs_init_failed:
+ orangefs_debugfs_cleanup();
+
+prepare_helpstring_failed:
+
cleanup_progress_table:
kfree(htable_ops_in_progress);