aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2014-06-04 12:23:55 -0400
committerJens Axboe <axboe@fb.com>2014-06-04 12:40:16 -0400
commit14b83e172f0bc83b8dcf78ee8b1844beeffb418d (patch)
tree3695014cf1ecadfaba613ed6d5e6be39b6788d68 /block
parent0e62f51f8753b048f391ee2d7f2af1f7297b0be5 (diff)
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 <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-flush.c2
1 files changed, 1 insertions, 1 deletions
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)
225 225
226 if (q->mq_ops) { 226 if (q->mq_ops) {
227 spin_lock_irqsave(&q->mq_flush_lock, flags); 227 spin_lock_irqsave(&q->mq_flush_lock, flags);
228 q->flush_rq->cmd_flags = 0; 228 q->flush_rq->tag = -1;
229 } 229 }
230 230
231 running = &q->flush_queue[q->flush_running_idx]; 231 running = &q->flush_queue[q->flush_running_idx];