aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c8
-rw-r--r--block/blk-mq.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 9677c6525ed8..936876ab662d 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1401,13 +1401,19 @@ bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio,
1401 struct blk_plug *plug; 1401 struct blk_plug *plug;
1402 struct request *rq; 1402 struct request *rq;
1403 bool ret = false; 1403 bool ret = false;
1404 struct list_head *plug_list;
1404 1405
1405 plug = current->plug; 1406 plug = current->plug;
1406 if (!plug) 1407 if (!plug)
1407 goto out; 1408 goto out;
1408 *request_count = 0; 1409 *request_count = 0;
1409 1410
1410 list_for_each_entry_reverse(rq, &plug->list, queuelist) { 1411 if (q->mq_ops)
1412 plug_list = &plug->mq_list;
1413 else
1414 plug_list = &plug->list;
1415
1416 list_for_each_entry_reverse(rq, plug_list, queuelist) {
1411 int el_ret; 1417 int el_ret;
1412 1418
1413 if (rq->q == q) 1419 if (rq->q == q)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 2dc8de86d0d2..88d4e864d4c0 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -950,7 +950,7 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
950 950
951 if (plug) { 951 if (plug) {
952 blk_mq_bio_to_request(rq, bio); 952 blk_mq_bio_to_request(rq, bio);
953 if (list_empty(&plug->list)) 953 if (list_empty(&plug->mq_list))
954 trace_block_plug(q); 954 trace_block_plug(q);
955 else if (request_count >= BLK_MAX_REQUEST_COUNT) { 955 else if (request_count >= BLK_MAX_REQUEST_COUNT) {
956 blk_flush_plug_list(plug, false); 956 blk_flush_plug_list(plug, false);