@@ -144,21 +144,12 @@ static int __init orangefs_init(void)
144
144
if (ret < 0 )
145
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
147
htable_ops_in_progress =
157
148
kcalloc (hash_table_size , sizeof (struct list_head ), GFP_KERNEL );
158
149
if (!htable_ops_in_progress ) {
159
150
gossip_err ("Failed to initialize op hashtable" );
160
151
ret = - ENOMEM ;
161
- goto cleanup_device ;
152
+ goto cleanup_inode ;
162
153
}
163
154
164
155
/* initialize a doubly linked at each hash table index */
@@ -198,6 +189,15 @@ static int __init orangefs_init(void)
198
189
if (ret )
199
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
201
ret = register_filesystem (& orangefs_fs_type );
202
202
if (ret == 0 ) {
203
203
pr_info ("orangefs: module version %s loaded\n" , ORANGEFS_VERSION );
@@ -207,6 +207,9 @@ static int __init orangefs_init(void)
207
207
208
208
orangefs_sysfs_exit ();
209
209
210
+ cleanup_device :
211
+ orangefs_dev_cleanup ();
212
+
210
213
sysfs_init_failed :
211
214
212
215
kernel_debug_init_failed :
@@ -220,9 +223,6 @@ static int __init orangefs_init(void)
220
223
cleanup_progress_table :
221
224
kfree (htable_ops_in_progress );
222
225
223
- cleanup_device :
224
- orangefs_dev_cleanup ();
225
-
226
226
cleanup_inode :
227
227
orangefs_inode_cache_finalize ();
228
228
0 commit comments