summaryrefslogtreecommitdiff
path: root/block/blk-flush.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r--block/blk-flush.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 0b68a1258bdd..620d69909b8d 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -265,8 +265,10 @@ static void flush_end_io(struct request *flush_rq, int error)
* kblockd.
*/
if (queued || fq->flush_queue_delayed) {
- WARN_ON(q->mq_ops);
- blk_run_queue_async(q);
+ if (q->mq_ops)
+ blk_mq_run_hw_queues(q, true);
+ else
+ blk_run_queue_async(q);
}
fq->flush_queue_delayed = 0;
if (blk_use_mq_path(q))
@@ -346,8 +348,12 @@ static void flush_data_end_io(struct request *rq, int error)
* After populating an empty queue, kick it to avoid stall. Read
* the comment in flush_end_io().
*/
- if (blk_flush_complete_seq(rq, fq, REQ_FSEQ_DATA, error))
- blk_run_queue_async(q);
+ if (blk_flush_complete_seq(rq, fq, REQ_FSEQ_DATA, error)) {
+ if (q->mq_ops)
+ blk_mq_run_hw_queues(q, true);
+ else
+ blk_run_queue_async(q);
+ }
}
static void mq_flush_data_end_io(struct request *rq, int error)