diff options
author | Mike Marshall <hubcap@omnibond.com> | 2016-03-14 20:30:39 +0100 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-03-14 20:48:28 +0100 |
commit | 2180c52cc72993b3b097573aaa550f273f795c8a (patch) | |
tree | a68459be5a0284947331fd86855a6b858730e1a9 /fs/orangefs/orangefs-mod.c | |
parent | Orangefs: follow_link -> get_link change (diff) | |
download | linux-2180c52cc72993b3b097573aaa550f273f795c8a.tar.xz linux-2180c52cc72993b3b097573aaa550f273f795c8a.zip |
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.c | 29 |
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); |