mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
dabcefab45
commit
344e9ffcbd
14 changed files with 36 additions and 42 deletions
|
@ -656,11 +656,7 @@ static inline bool blk_account_rq(struct request *rq)
|
|||
|
||||
#define rq_data_dir(rq) (op_is_write(req_op(rq)) ? WRITE : READ)
|
||||
|
||||
/*
|
||||
* Driver can handle struct request, if it either has an old style
|
||||
* request_fn defined, or is blk-mq based.
|
||||
*/
|
||||
static inline bool queue_is_rq_based(struct request_queue *q)
|
||||
static inline bool queue_is_mq(struct request_queue *q)
|
||||
{
|
||||
return q->mq_ops;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue