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 /include/linux/blkdev.h | |
| 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 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1d185f1fc333..41aaa05e42c1 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -656,11 +656,7 @@ static inline bool blk_account_rq(struct request *rq) | |||
| 656 | 656 | ||
| 657 | #define rq_data_dir(rq) (op_is_write(req_op(rq)) ? WRITE : READ) | 657 | #define rq_data_dir(rq) (op_is_write(req_op(rq)) ? WRITE : READ) |
| 658 | 658 | ||
| 659 | /* | 659 | static inline bool queue_is_mq(struct request_queue *q) |
| 660 | * Driver can handle struct request, if it either has an old style | ||
| 661 | * request_fn defined, or is blk-mq based. | ||
| 662 | */ | ||
| 663 | static inline bool queue_is_rq_based(struct request_queue *q) | ||
| 664 | { | 660 | { |
| 665 | return q->mq_ops; | 661 | return q->mq_ops; |
| 666 | } | 662 | } |
