diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-15 14:22:51 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-16 10:34:06 -0500 |
commit | 344e9ffcbd1898e1dc04085564a6e05c30ea8199 (patch) | |
tree | ba71320bc66d1158790acf1cdeedd21d2da9dead /block/blk-throttle.c | |
parent | dabcefab45d36ecb5a22f16577bb0f298876a22d (diff) |
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-throttle.c')
-rw-r--r-- | block/blk-throttle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index d0a23f0bb3ed..8f0a104770ee 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -2456,7 +2456,7 @@ void blk_throtl_register_queue(struct request_queue *q) | |||
2456 | td->throtl_slice = DFL_THROTL_SLICE_HD; | 2456 | td->throtl_slice = DFL_THROTL_SLICE_HD; |
2457 | #endif | 2457 | #endif |
2458 | 2458 | ||
2459 | td->track_bio_latency = !queue_is_rq_based(q); | 2459 | td->track_bio_latency = !queue_is_mq(q); |
2460 | if (!td->track_bio_latency) | 2460 | if (!td->track_bio_latency) |
2461 | blk_stat_enable_accounting(q); | 2461 | blk_stat_enable_accounting(q); |
2462 | } | 2462 | } |