File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1291,15 +1291,16 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
12911291 blk_mq_bio_to_request (rq , bio );
12921292
12931293 /*
1294- * we do limited pluging. If bio can be merged, do merge .
1294+ * We do limited pluging. If the bio can be merged, do that .
12951295 * Otherwise the existing request in the plug list will be
12961296 * issued. So the plug list will have one request at most
12971297 */
12981298 if (plug ) {
12991299 /*
13001300 * The plug list might get flushed before this. If that
1301- * happens, same_queue_rq is invalid and plug list is empty
1302- **/
1301+ * happens, same_queue_rq is invalid and plug list is
1302+ * empty
1303+ */
13031304 if (same_queue_rq && !list_empty (& plug -> mq_list )) {
13041305 old_rq = same_queue_rq ;
13051306 list_del_init (& old_rq -> queuelist );
@@ -1380,12 +1381,15 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
13801381 blk_mq_bio_to_request (rq , bio );
13811382 if (!request_count )
13821383 trace_block_plug (q );
1383- else if (request_count >= BLK_MAX_REQUEST_COUNT ) {
1384+
1385+ blk_mq_put_ctx (data .ctx );
1386+
1387+ if (request_count >= BLK_MAX_REQUEST_COUNT ) {
13841388 blk_flush_plug_list (plug , false);
13851389 trace_block_plug (q );
13861390 }
1391+
13871392 list_add_tail (& rq -> queuelist , & plug -> mq_list );
1388- blk_mq_put_ctx (data .ctx );
13891393 return cookie ;
13901394 }
13911395
You can’t perform that action at this time.
0 commit comments