]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - block/blk-sysfs.c
block: add queue_is_mq() helper
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Nov 2018 19:22:51 +0000 (12:22 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 16 Nov 2018 15:34:06 +0000 (08:34 -0700)
commit344e9ffcbd1898e1dc04085564a6e05c30ea8199
treeba71320bc66d1158790acf1cdeedd21d2da9dead
parentdabcefab45d36ecb5a22f16577bb0f298876a22d
block: add queue_is_mq() helper

Various spots check for q->mq_ops being non-NULL, but provide
a helper to do this instead.

Where the ->mq_ops != NULL check is redundant, remove it.

Since mq == rq-based now that legacy is gone, get rid of the
queue_is_rq_based() and just use queue_is_mq() everywhere.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
14 files changed:
block/blk-cgroup.c
block/blk-core.c
block/blk-flush.c
block/blk-mq.c
block/blk-sysfs.c
block/blk-throttle.c
block/blk-wbt.c
block/blk-zoned.c
block/bsg.c
block/elevator.c
block/genhd.c
drivers/md/dm-rq.c
drivers/md/dm-table.c
include/linux/blkdev.h