diff options
author | Christoph Hellwig <hch@lst.de> | 2021-05-21 07:50:51 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-01 07:42:22 -0600 |
commit | 7c3f828b522b07adb341b08fde1660685c5ba3eb (patch) | |
tree | ec838c19b8258a60d105f8a89df36f414a54cf1f /block/blk.h | |
parent | d97e594c51660bea510a387731637b894651e4b5 (diff) |
block: refactor device number setup in __device_add_disk
Untangle the mess around blk_alloc_devt by moving the check for
the used allocation scheme into the callers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20210521055116.1053587-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk.h b/block/blk.h index 8b3591aee0a5..cba3a94aabfa 100644 --- a/block/blk.h +++ b/block/blk.h @@ -343,8 +343,8 @@ static inline void blk_queue_free_zone_bitmaps(struct request_queue *q) {} static inline void blk_queue_clear_zone_settings(struct request_queue *q) {} #endif -int blk_alloc_devt(struct block_device *part, dev_t *devt); -void blk_free_devt(dev_t devt); +int blk_alloc_ext_minor(void); +void blk_free_ext_minor(unsigned int minor); char *disk_name(struct gendisk *hd, int partno, char *buf); #define ADDPART_FLAG_NONE 0 #define ADDPART_FLAG_RAID 1 |