diff options
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 2758cdf2de94..d39e8a5eaeaa 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -508,20 +508,22 @@ void blk_mq_kick_requeue_list(struct request_queue *q) | |||
508 | } | 508 | } |
509 | EXPORT_SYMBOL(blk_mq_kick_requeue_list); | 509 | EXPORT_SYMBOL(blk_mq_kick_requeue_list); |
510 | 510 | ||
511 | static inline bool is_flush_request(struct request *rq, unsigned int tag) | 511 | static inline bool is_flush_request(struct request *rq, |
512 | struct blk_flush_queue *fq, unsigned int tag) | ||
512 | { | 513 | { |
513 | return ((rq->cmd_flags & REQ_FLUSH_SEQ) && | 514 | return ((rq->cmd_flags & REQ_FLUSH_SEQ) && |
514 | rq->q->flush_rq->tag == tag); | 515 | fq->flush_rq->tag == tag); |
515 | } | 516 | } |
516 | 517 | ||
517 | struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) | 518 | struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) |
518 | { | 519 | { |
519 | struct request *rq = tags->rqs[tag]; | 520 | struct request *rq = tags->rqs[tag]; |
521 | struct blk_flush_queue *fq = blk_get_flush_queue(rq->q); | ||
520 | 522 | ||
521 | if (!is_flush_request(rq, tag)) | 523 | if (!is_flush_request(rq, fq, tag)) |
522 | return rq; | 524 | return rq; |
523 | 525 | ||
524 | return rq->q->flush_rq; | 526 | return fq->flush_rq; |
525 | } | 527 | } |
526 | EXPORT_SYMBOL(blk_mq_tag_to_rq); | 528 | EXPORT_SYMBOL(blk_mq_tag_to_rq); |
527 | 529 | ||