]> www.infradead.org Git - nvme.git/commit
block: better split mq vs non-mq code in add_disk_fwnode
authorChristoph Hellwig <hch@lst.de>
Mon, 6 Jan 2025 08:35:08 +0000 (09:35 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Jan 2025 14:37:41 +0000 (07:37 -0700)
commit6783811569aef24b949992bd5c4e6eaac02a0c30
treeb92634c5d2ab154edfabae88faecda353f37e253
parentb7175e24d6acf79d9f3af9ce9d3d50de1fa748ec
block: better split mq vs non-mq code in add_disk_fwnode

Add a big conditional for blk-mq vs not mq at the beginning of
add_disk_fwnode so that elevator_init_mq is only called for blk-mq disks,
and add checks that the right methods or set or not set based on the
queue type.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250106083531.799976-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c