aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-03-17 13:20:35 -0400
committerMike Marshall <hubcap@omnibond.com>2016-03-17 14:34:10 -0400
commit2f83ace37181e445cab83d1d2a3a1dc88a36a814 (patch)
treea9dae9a0f5ae6d6060a8cc52ea477b8fbfbb20fc
parenta4c680a027f52e179175fe451c69a55aba748efd (diff)
orangefs: put register_chrdev immediately before register_filesystem
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r--fs/orangefs/orangefs-mod.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c
index 76a1b9765e23..6f072a8c0de1 100644
--- a/fs/orangefs/orangefs-mod.c
+++ b/fs/orangefs/orangefs-mod.c
@@ -144,21 +144,12 @@ static int __init orangefs_init(void)
144 if (ret < 0) 144 if (ret < 0)
145 goto cleanup_op; 145 goto cleanup_op;
146 146
147 /* Initialize the orangefsdev subsystem. */
148 ret = orangefs_dev_init();
149 if (ret < 0) {
150 gossip_err("%s: could not initialize device subsystem %d!\n",
151 __func__,
152 ret);
153 goto cleanup_inode;
154 }
155
156 htable_ops_in_progress = 147 htable_ops_in_progress =
157 kcalloc(hash_table_size, sizeof(struct list_head), GFP_KERNEL); 148 kcalloc(hash_table_size, sizeof(struct list_head), GFP_KERNEL);
158 if (!htable_ops_in_progress) { 149 if (!htable_ops_in_progress) {
159 gossip_err("Failed to initialize op hashtable"); 150 gossip_err("Failed to initialize op hashtable");
160 ret = -ENOMEM; 151 ret = -ENOMEM;
161 goto cleanup_device; 152 goto cleanup_inode;
162 } 153 }
163 154
164 /* initialize a doubly linked at each hash table index */ 155 /* initialize a doubly linked at each hash table index */
@@ -198,6 +189,15 @@ static int __init orangefs_init(void)
198 if (ret) 189 if (ret)
199 goto sysfs_init_failed; 190 goto sysfs_init_failed;
200 191
192 /* Initialize the orangefsdev subsystem. */
193 ret = orangefs_dev_init();
194 if (ret < 0) {
195 gossip_err("%s: could not initialize device subsystem %d!\n",
196 __func__,
197 ret);
198 goto cleanup_device;
199 }
200
201 ret = register_filesystem(&orangefs_fs_type); 201 ret = register_filesystem(&orangefs_fs_type);
202 if (ret == 0) { 202 if (ret == 0) {
203 pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION); 203 pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
@@ -207,6 +207,9 @@ static int __init orangefs_init(void)
207 207
208 orangefs_sysfs_exit(); 208 orangefs_sysfs_exit();
209 209
210cleanup_device:
211 orangefs_dev_cleanup();
212
210sysfs_init_failed: 213sysfs_init_failed:
211 214
212kernel_debug_init_failed: 215kernel_debug_init_failed:
@@ -220,9 +223,6 @@ cleanup_key_table:
220cleanup_progress_table: 223cleanup_progress_table:
221 kfree(htable_ops_in_progress); 224 kfree(htable_ops_in_progress);
222 225
223cleanup_device:
224 orangefs_dev_cleanup();
225
226cleanup_inode: 226cleanup_inode:
227 orangefs_inode_cache_finalize(); 227 orangefs_inode_cache_finalize();
228 228