aboutsummaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 06:56:16 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:08 -0400
commit689d6fac40b41c7bf154f362deaf442548e4dc81 (patch)
tree5989dc5767f657272194ee8c7d69c6db1e62dab7 /block/genhd.c
parent540eed5637b766bb1e881ef744c42617760b4815 (diff)
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 <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/block/genhd.c b/block/genhd.c
index c2b14aa69d58..eedab5b4685b 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1024,19 +1024,10 @@ struct gendisk *alloc_disk(int minors)
1024{ 1024{
1025 return alloc_disk_node(minors, -1); 1025 return alloc_disk_node(minors, -1);
1026} 1026}
1027EXPORT_SYMBOL(alloc_disk);
1027 1028
1028struct gendisk *alloc_disk_node(int minors, int node_id) 1029struct gendisk *alloc_disk_node(int minors, int node_id)
1029{ 1030{
1030 return alloc_disk_ext_node(minors, 0, node_id);
1031}
1032
1033struct gendisk *alloc_disk_ext(int minors, int ext_minors)
1034{
1035 return alloc_disk_ext_node(minors, ext_minors, -1);
1036}
1037
1038struct gendisk *alloc_disk_ext_node(int minors, int ext_minors, int node_id)
1039{
1040 struct gendisk *disk; 1031 struct gendisk *disk;
1041 1032
1042 disk = kmalloc_node(sizeof(struct gendisk), 1033 disk = kmalloc_node(sizeof(struct gendisk),
@@ -1054,7 +1045,6 @@ struct gendisk *alloc_disk_ext_node(int minors, int ext_minors, int node_id)
1054 disk->part_tbl->part[0] = &disk->part0; 1045 disk->part_tbl->part[0] = &disk->part0;
1055 1046
1056 disk->minors = minors; 1047 disk->minors = minors;
1057 disk->ext_minors = ext_minors;
1058 rand_initialize_disk(disk); 1048 rand_initialize_disk(disk);
1059 disk_to_dev(disk)->class = &block_class; 1049 disk_to_dev(disk)->class = &block_class;
1060 disk_to_dev(disk)->type = &disk_type; 1050 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)
1065 } 1055 }
1066 return disk; 1056 return disk;
1067} 1057}
1068
1069EXPORT_SYMBOL(alloc_disk);
1070EXPORT_SYMBOL(alloc_disk_node); 1058EXPORT_SYMBOL(alloc_disk_node);
1071EXPORT_SYMBOL(alloc_disk_ext);
1072EXPORT_SYMBOL(alloc_disk_ext_node);
1073 1059
1074struct kobject *get_disk(struct gendisk *disk) 1060struct kobject *get_disk(struct gendisk *disk)
1075{ 1061{