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>
        struct blk_plug *plug;
        struct request *rq;
        bool ret = false;
+       struct list_head *plug_list;
 
        plug = current->plug;
        if (!plug)
                goto out;
        *request_count = 0;
 
-       list_for_each_entry_reverse(rq, &plug->list, queuelist) {
+       if (q->mq_ops)
+               plug_list = &plug->mq_list;
+       else
+               plug_list = &plug->list;
+
+       list_for_each_entry_reverse(rq, plug_list, queuelist) {
                int el_ret;
 
                if (rq->q == q)
 
 
                if (plug) {
                        blk_mq_bio_to_request(rq, bio);
-                       if (list_empty(&plug->list))
+                       if (list_empty(&plug->mq_list))
                                trace_block_plug(q);
                        else if (request_count >= BLK_MAX_REQUEST_COUNT) {
                                blk_flush_plug_list(plug, false);