From: Ming Lei Date: Wed, 4 Jun 2014 16:23:55 +0000 (+0800) Subject: block: mq flush: clear flush_rq's tag in flush_end_io() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14b83e172f0bc83b8dcf78ee8b1844beeffb418d;p=linux-beck.git block: mq flush: clear flush_rq's tag in flush_end_io() 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 Signed-off-by: Jens Axboe --- diff --git a/block/blk-flush.c b/block/blk-flush.c index ff87c664b7df..8ffee4b5f93d 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -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];