Skip to content

Commit

Permalink
orangefs: put register_chrdev immediately before register_filesystem
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
  • Loading branch information
Martin Brandenburg authored and hubcapsc committed Mar 17, 2016
1 parent a4c680a commit 2f83ace
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions fs/orangefs/orangefs-mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,12 @@ static int __init orangefs_init(void)
if (ret < 0)
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 =
kcalloc(hash_table_size, sizeof(struct list_head), GFP_KERNEL);
if (!htable_ops_in_progress) {
gossip_err("Failed to initialize op hashtable");
ret = -ENOMEM;
goto cleanup_device;
goto cleanup_inode;
}

/* initialize a doubly linked at each hash table index */
Expand Down Expand Up @@ -198,6 +189,15 @@ static int __init orangefs_init(void)
if (ret)
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);
if (ret == 0) {
pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
Expand All @@ -207,6 +207,9 @@ static int __init orangefs_init(void)

orangefs_sysfs_exit();

cleanup_device:
orangefs_dev_cleanup();

sysfs_init_failed:

kernel_debug_init_failed:
Expand All @@ -220,9 +223,6 @@ static int __init orangefs_init(void)
cleanup_progress_table:
kfree(htable_ops_in_progress);

cleanup_device:
orangefs_dev_cleanup();

cleanup_inode:
orangefs_inode_cache_finalize();

Expand Down

0 comments on commit 2f83ace

Please sign in to comment.