summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-16 16:19:07 +0300
committerJens Axboe <axboe@kernel.dk>2021-08-23 21:54:30 +0300
commita58bd7683fcb60ae24c8572f932b48bc65719b7c (patch)
treea8d555d924ba357bc4953be4ed31483b0f08eb9c /block/genhd.c
parent9c2b9dbafc067e173db30c4fd0636392d27944e8 (diff)
downloadlinux-a58bd7683fcb60ae24c8572f932b48bc65719b7c.tar.xz
block: remove the minors argument to __alloc_disk_node
This was a leftover from the legacy alloc_disk interface. Switch the scsi ULPs and dasd to set ->minors directly like all other drivers and remove the argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> [dasd] Link: https://lore.kernel.org/r/20210816131910.615153-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 2ad2b25dfc87..caeda726189c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1254,8 +1254,7 @@ dev_t blk_lookup_devt(const char *name, int partno)
return devt;
}
-struct gendisk *__alloc_disk_node(int minors, int node_id,
- struct lock_class_key *lkclass)
+struct gendisk *__alloc_disk_node(int node_id, struct lock_class_key *lkclass)
{
struct gendisk *disk;
@@ -1277,7 +1276,6 @@ struct gendisk *__alloc_disk_node(int minors, int node_id,
if (xa_insert(&disk->part_tbl, 0, disk->part0, GFP_KERNEL))
goto out_destroy_part_tbl;
- disk->minors = minors;
rand_initialize_disk(disk);
disk_to_dev(disk)->class = &block_class;
disk_to_dev(disk)->type = &disk_type;
@@ -1309,7 +1307,7 @@ struct gendisk *__blk_alloc_disk(int node, struct lock_class_key *lkclass)
if (!q)
return NULL;
- disk = __alloc_disk_node(0, node, lkclass);
+ disk = __alloc_disk_node(node, lkclass);
if (!disk) {
blk_cleanup_queue(q);
return NULL;