diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-27 11:30:11 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-27 19:23:43 +0300 |
commit | 3d745ea5b095a3985129e162900b7e6c22518a9d (patch) | |
tree | 38a7c6995ddf6e14ae5b7a2bc013590af4ce5f9d /drivers/block/umem.c | |
parent | ff27668ce8092c74965f21b5c02ebc6b6764db95 (diff) | |
download | linux-3d745ea5b095a3985129e162900b7e6c22518a9d.tar.xz |
block: simplify queue allocation
Current make_request based drivers use either blk_alloc_queue_node or
blk_alloc_queue to allocate a queue, and then set up the make_request_fn
function pointer and a few parameters using the blk_queue_make_request
helper. Simplify this by passing the make_request pointer to
blk_alloc_queue, and while at it merge the _node variant into the main
helper by always passing a node_id, and remove the superfluous gfp_mask
parameter. A lower-level __blk_alloc_queue is kept for the blk-mq case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/umem.c')
-rw-r--r-- | drivers/block/umem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 4eaf97d7a170..d84e8a878df2 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -885,11 +885,9 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) card->biotail = &card->bio; spin_lock_init(&card->lock); - card->queue = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE); + card->queue = blk_alloc_queue(mm_make_request, NUMA_NO_NODE); if (!card->queue) goto failed_alloc; - - blk_queue_make_request(card->queue, mm_make_request); card->queue->queuedata = card; tasklet_init(&card->tasklet, process_page, (unsigned long)card); |