block: refactor device number setup in __device_add_disk
authorChristoph Hellwig <hch@lst.de>
Fri, 21 May 2021 05:50:51 +0000 (07:50 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jun 2021 13:42:22 +0000 (07:42 -0600)
commit7c3f828b522b07adb341b08fde1660685c5ba3eb
treeec838c19b8258a60d105f8a89df36f414a54cf1f
parentd97e594c51660bea510a387731637b894651e4b5
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>
block/blk.h
block/genhd.c
block/partitions/core.c