Skip to content

Commit

Permalink
block: mq flush: clear flush_rq's tag in flush_end_io()
Browse files Browse the repository at this point in the history
blk_mq_tag_to_rq() needs to be able to tell if it should return
the original request, or the flush request if we are doing a flush
sequence. Clear the flush tag when IO completes for a flush, since
that is what we are comparing against.

Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
ming1 authored and axboe committed Jun 4, 2014
1 parent 0e62f51 commit 14b83e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static void flush_end_io(struct request *flush_rq, int error)

if (q->mq_ops) {
spin_lock_irqsave(&q->mq_flush_lock, flags);
q->flush_rq->cmd_flags = 0;
q->flush_rq->tag = -1;
}

running = &q->flush_queue[q->flush_running_idx];
Expand Down

0 comments on commit 14b83e1

Please sign in to comment.