aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 1583ed28ea03..a7d70a1bbf36 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -963,14 +963,9 @@ void blk_mq_insert_request(struct request *rq, bool at_head, bool run_queue,
963 963
964 hctx = q->mq_ops->map_queue(q, ctx->cpu); 964 hctx = q->mq_ops->map_queue(q, ctx->cpu);
965 965
966 if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA) && 966 spin_lock(&ctx->lock);
967 !(rq->cmd_flags & (REQ_FLUSH_SEQ))) { 967 __blk_mq_insert_request(hctx, rq, at_head);
968 blk_insert_flush(rq); 968 spin_unlock(&ctx->lock);
969 } else {
970 spin_lock(&ctx->lock);
971 __blk_mq_insert_request(hctx, rq, at_head);
972 spin_unlock(&ctx->lock);
973 }
974 969
975 if (run_queue) 970 if (run_queue)
976 blk_mq_run_hw_queue(hctx, async); 971 blk_mq_run_hw_queue(hctx, async);