OSDN Git Service

block: move the DISK_MAX_PARTS sanity check into __device_add_disk
authorChristoph Hellwig <hch@lst.de>
Fri, 21 May 2021 05:50:52 +0000 (07:50 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jun 2021 13:42:23 +0000 (07:42 -0600)
commit2e3c73fa0c419f62fd588731be30fb0d1bca9ad6
tree0eec93944f437ddf5cac38d5dbbdba8b7f0abcf4
parent7c3f828b522b07adb341b08fde1660685c5ba3eb
block: move the DISK_MAX_PARTS sanity check into __device_add_disk

Keep this together with the first place that actually looks at
->minors and prepare for not passing a minors argument to
alloc_disk.

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-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c