mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
orangefs: put register_chrdev immediately before register_filesystem
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
parent
a4c680a027
commit
2f83ace371
@ -144,21 +144,12 @@ static int __init orangefs_init(void)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup_op;
|
goto cleanup_op;
|
||||||
|
|
||||||
/* Initialize the orangefsdev subsystem. */
|
|
||||||
ret = orangefs_dev_init();
|
|
||||||
if (ret < 0) {
|
|
||||||
gossip_err("%s: could not initialize device subsystem %d!\n",
|
|
||||||
__func__,
|
|
||||||
ret);
|
|
||||||
goto cleanup_inode;
|
|
||||||
}
|
|
||||||
|
|
||||||
htable_ops_in_progress =
|
htable_ops_in_progress =
|
||||||
kcalloc(hash_table_size, sizeof(struct list_head), GFP_KERNEL);
|
kcalloc(hash_table_size, sizeof(struct list_head), GFP_KERNEL);
|
||||||
if (!htable_ops_in_progress) {
|
if (!htable_ops_in_progress) {
|
||||||
gossip_err("Failed to initialize op hashtable");
|
gossip_err("Failed to initialize op hashtable");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto cleanup_device;
|
goto cleanup_inode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize a doubly linked at each hash table index */
|
/* initialize a doubly linked at each hash table index */
|
||||||
@ -198,6 +189,15 @@ static int __init orangefs_init(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto sysfs_init_failed;
|
goto sysfs_init_failed;
|
||||||
|
|
||||||
|
/* Initialize the orangefsdev subsystem. */
|
||||||
|
ret = orangefs_dev_init();
|
||||||
|
if (ret < 0) {
|
||||||
|
gossip_err("%s: could not initialize device subsystem %d!\n",
|
||||||
|
__func__,
|
||||||
|
ret);
|
||||||
|
goto cleanup_device;
|
||||||
|
}
|
||||||
|
|
||||||
ret = register_filesystem(&orangefs_fs_type);
|
ret = register_filesystem(&orangefs_fs_type);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
|
pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
|
||||||
@ -207,6 +207,9 @@ static int __init orangefs_init(void)
|
|||||||
|
|
||||||
orangefs_sysfs_exit();
|
orangefs_sysfs_exit();
|
||||||
|
|
||||||
|
cleanup_device:
|
||||||
|
orangefs_dev_cleanup();
|
||||||
|
|
||||||
sysfs_init_failed:
|
sysfs_init_failed:
|
||||||
|
|
||||||
kernel_debug_init_failed:
|
kernel_debug_init_failed:
|
||||||
@ -220,9 +223,6 @@ cleanup_key_table:
|
|||||||
cleanup_progress_table:
|
cleanup_progress_table:
|
||||||
kfree(htable_ops_in_progress);
|
kfree(htable_ops_in_progress);
|
||||||
|
|
||||||
cleanup_device:
|
|
||||||
orangefs_dev_cleanup();
|
|
||||||
|
|
||||||
cleanup_inode:
|
cleanup_inode:
|
||||||
orangefs_inode_cache_finalize();
|
orangefs_inode_cache_finalize();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user