diff options
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r-- | block/blk-flush.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c index 0e42adcfb55e..c41fc19f75d1 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c | |||
@@ -307,16 +307,8 @@ static bool blk_kick_flush(struct request_queue *q) | |||
307 | q->flush_pending_idx ^= 1; | 307 | q->flush_pending_idx ^= 1; |
308 | 308 | ||
309 | blk_rq_init(q, q->flush_rq); | 309 | blk_rq_init(q, q->flush_rq); |
310 | if (q->mq_ops) { | 310 | if (q->mq_ops) |
311 | /* | 311 | blk_mq_clone_flush_request(q->flush_rq, first_rq); |
312 | * Reuse the tag value from the fist waiting request, | ||
313 | * with blk-mq the tag is generated during request | ||
314 | * allocation and drivers can rely on it being inside | ||
315 | * the range they asked for. | ||
316 | */ | ||
317 | q->flush_rq->mq_ctx = first_rq->mq_ctx; | ||
318 | q->flush_rq->tag = first_rq->tag; | ||
319 | } | ||
320 | 312 | ||
321 | q->flush_rq->cmd_type = REQ_TYPE_FS; | 313 | q->flush_rq->cmd_type = REQ_TYPE_FS; |
322 | q->flush_rq->cmd_flags = WRITE_FLUSH | REQ_FLUSH_SEQ; | 314 | q->flush_rq->cmd_flags = WRITE_FLUSH | REQ_FLUSH_SEQ; |