mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
block: replace @ext_minors with GENHD_FL_EXT_DEVT
With previous changes, it's meaningless to limit the number of partitions. Replace @ext_minors with GENHD_FL_EXT_DEVT such that setting the flag allows the disk to have maximum number of allowed partitions (only limited by the number of entries in parsed_partitions as determined by MAX_PART constant). This kills not-too-pretty alloc_disk_ext[_node]() functions and makes @minors parameter to alloc_disk[_node]() unnecessary. The parameter is left alone to avoid disturbing the users. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
540eed5637
commit
689d6fac40
5 changed files with 17 additions and 42 deletions
|
|
@ -1024,18 +1024,9 @@ struct gendisk *alloc_disk(int minors)
|
|||
{
|
||||
return alloc_disk_node(minors, -1);
|
||||
}
|
||||
EXPORT_SYMBOL(alloc_disk);
|
||||
|
||||
struct gendisk *alloc_disk_node(int minors, int node_id)
|
||||
{
|
||||
return alloc_disk_ext_node(minors, 0, node_id);
|
||||
}
|
||||
|
||||
struct gendisk *alloc_disk_ext(int minors, int ext_minors)
|
||||
{
|
||||
return alloc_disk_ext_node(minors, ext_minors, -1);
|
||||
}
|
||||
|
||||
struct gendisk *alloc_disk_ext_node(int minors, int ext_minors, int node_id)
|
||||
{
|
||||
struct gendisk *disk;
|
||||
|
||||
|
|
@ -1054,7 +1045,6 @@ struct gendisk *alloc_disk_ext_node(int minors, int ext_minors, int node_id)
|
|||
disk->part_tbl->part[0] = &disk->part0;
|
||||
|
||||
disk->minors = minors;
|
||||
disk->ext_minors = ext_minors;
|
||||
rand_initialize_disk(disk);
|
||||
disk_to_dev(disk)->class = &block_class;
|
||||
disk_to_dev(disk)->type = &disk_type;
|
||||
|
|
@ -1065,11 +1055,7 @@ struct gendisk *alloc_disk_ext_node(int minors, int ext_minors, int node_id)
|
|||
}
|
||||
return disk;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(alloc_disk);
|
||||
EXPORT_SYMBOL(alloc_disk_node);
|
||||
EXPORT_SYMBOL(alloc_disk_ext);
|
||||
EXPORT_SYMBOL(alloc_disk_ext_node);
|
||||
|
||||
struct kobject *get_disk(struct gendisk *disk)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue