Skip to content

Commit 2f83ace

Browse files
Martin Brandenburghubcapsc
authored andcommitted
orangefs: put register_chrdev immediately before register_filesystem
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
1 parent a4c680a commit 2f83ace

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

fs/orangefs/orangefs-mod.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,12 @@ static int __init orangefs_init(void)
144144
if (ret < 0)
145145
goto cleanup_op;
146146

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-
156147
htable_ops_in_progress =
157148
kcalloc(hash_table_size, sizeof(struct list_head), GFP_KERNEL);
158149
if (!htable_ops_in_progress) {
159150
gossip_err("Failed to initialize op hashtable");
160151
ret = -ENOMEM;
161-
goto cleanup_device;
152+
goto cleanup_inode;
162153
}
163154

164155
/* initialize a doubly linked at each hash table index */
@@ -198,6 +189,15 @@ static int __init orangefs_init(void)
198189
if (ret)
199190
goto sysfs_init_failed;
200191

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+
201201
ret = register_filesystem(&orangefs_fs_type);
202202
if (ret == 0) {
203203
pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
@@ -207,6 +207,9 @@ static int __init orangefs_init(void)
207207

208208
orangefs_sysfs_exit();
209209

210+
cleanup_device:
211+
orangefs_dev_cleanup();
212+
210213
sysfs_init_failed:
211214

212215
kernel_debug_init_failed:
@@ -220,9 +223,6 @@ static int __init orangefs_init(void)
220223
cleanup_progress_table:
221224
kfree(htable_ops_in_progress);
222225

223-
cleanup_device:
224-
orangefs_dev_cleanup();
225-
226226
cleanup_inode:
227227
orangefs_inode_cache_finalize();
228228

0 commit comments

Comments
 (0)