diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-15 22:22:51 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-16 18:34:06 +0300 |
commit | 344e9ffcbd1898e1dc04085564a6e05c30ea8199 (patch) | |
tree | ba71320bc66d1158790acf1cdeedd21d2da9dead /block/blk-mq.c | |
parent | dabcefab45d36ecb5a22f16577bb0f298876a22d (diff) | |
download | linux-344e9ffcbd1898e1dc04085564a6e05c30ea8199.tar.xz |
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>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 3b823891b3ef..32b246ed44c0 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -150,7 +150,7 @@ void blk_freeze_queue_start(struct request_queue *q) freeze_depth = atomic_inc_return(&q->mq_freeze_depth); if (freeze_depth == 1) { percpu_ref_kill(&q->q_usage_counter); - if (q->mq_ops) + if (queue_is_mq(q)) blk_mq_run_hw_queues(q, false); } } |