aboutsummaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 4e5e7493f676..2f7feda61e35 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -768,6 +768,8 @@ static int __init genhd_device_init(void)
768 bdev_map = kobj_map_init(base_probe, &block_class_lock); 768 bdev_map = kobj_map_init(base_probe, &block_class_lock);
769 blk_dev_init(); 769 blk_dev_init();
770 770
771 register_blkdev(BLOCK_EXT_MAJOR, "blkext");
772
771#ifndef CONFIG_SYSFS_DEPRECATED 773#ifndef CONFIG_SYSFS_DEPRECATED
772 /* create top-level block dir */ 774 /* create top-level block dir */
773 block_depr = kobject_create_and_add("block", NULL); 775 block_depr = kobject_create_and_add("block", NULL);
@@ -1100,6 +1102,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
1100 kfree(disk); 1102 kfree(disk);
1101 return NULL; 1103 return NULL;
1102 } 1104 }
1105 disk->node_id = node_id;
1103 if (disk_expand_part_tbl(disk, 0)) { 1106 if (disk_expand_part_tbl(disk, 0)) {
1104 free_part_stats(&disk->part0); 1107 free_part_stats(&disk->part0);
1105 kfree(disk); 1108 kfree(disk);
@@ -1114,7 +1117,6 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
1114 device_initialize(disk_to_dev(disk)); 1117 device_initialize(disk_to_dev(disk));
1115 INIT_WORK(&disk->async_notify, 1118 INIT_WORK(&disk->async_notify,
1116 media_change_notify_thread); 1119 media_change_notify_thread);
1117 disk->node_id = node_id;
1118 } 1120 }
1119 return disk; 1121 return disk;
1120} 1122}