null_blk: convert to blk_alloc_disk/blk_cleanup_disk
authorChristoph Hellwig <hch@lst.de>
Fri, 21 May 2021 05:51:15 +0000 (07:51 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jun 2021 13:42:24 +0000 (07:42 -0600)
commit132226b301b545198515fb8c6b7f537c13b71f4d
treeeec8fad05b0fbfce3c62394964e557b09f56afb3
parentef35885400481b46ede9cbdcc1fce902e06002c5
null_blk: convert to blk_alloc_disk/blk_cleanup_disk

Convert the null_blk driver to use the blk_alloc_disk and blk_cleanup_disk
helpers to simplify gendisk and request_queue allocation.  Note that the
blk-mq mode is left with its own allocations scheme, to be handled later.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20210521055116.1053587-26-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk/main.c