aboutsummaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 71ab7521dd3d..3481a8712234 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2532,14 +2532,12 @@ void blk_mq_submit_bio(struct bio *bio)
return;
}
- if (unlikely(is_flush_fua)) {
- struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
- /* Bypass scheduler for flush requests */
- blk_insert_flush(rq);
- blk_mq_run_hw_queue(hctx, true);
- } else if (plug && (q->nr_hw_queues == 1 ||
- blk_mq_is_shared_tags(rq->mq_hctx->flags) ||
- q->mq_ops->commit_rqs || !blk_queue_nonrot(q))) {
+ if (is_flush_fua && blk_insert_flush(rq))
+ return;
+
+ if (plug && (q->nr_hw_queues == 1 ||
+ blk_mq_is_shared_tags(rq->mq_hctx->flags) ||
+ q->mq_ops->commit_rqs || !blk_queue_nonrot(q))) {
/*
* Use plugging if we have a ->commit_rqs() hook as well, as
* we know the driver uses bd->last in a smart fashion.