Commit 92f399c72af2d8cbb9d4f60e11d0d67ca738147f
Committed by
Jens Axboe
1 parent
3228f48be2
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
blk-mq: mq plug list breakage
We switched to plug mq_list for mq, but some code are still using old list. Signed-off-by: Shaohua Li <shli@fusionio.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Showing 2 changed files with 8 additions and 2 deletions Side-by-side Diff
block/blk-core.c
... | ... | @@ -1401,13 +1401,19 @@ |
1401 | 1401 | struct blk_plug *plug; |
1402 | 1402 | struct request *rq; |
1403 | 1403 | bool ret = false; |
1404 | + struct list_head *plug_list; | |
1404 | 1405 | |
1405 | 1406 | plug = current->plug; |
1406 | 1407 | if (!plug) |
1407 | 1408 | goto out; |
1408 | 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 | 1417 | int el_ret; |
1412 | 1418 | |
1413 | 1419 | if (rq->q == q) |
block/blk-mq.c