aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/blk-core.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 76850fc9cf23..52e756c526be 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1311,7 +1311,15 @@ get_rq:
1311 1311
1312 plug = current->plug; 1312 plug = current->plug;
1313 if (plug) { 1313 if (plug) {
1314 if (!plug->should_sort && !list_empty(&plug->list)) { 1314 /*
1315 * If this is the first request added after a plug, fire
1316 * of a plug trace. If others have been added before, check
1317 * if we have multiple devices in this plug. If so, make a
1318 * note to sort the list before dispatch.
1319 */
1320 if (list_empty(&plug->list))
1321 trace_block_plug(q);
1322 else if (!plug->should_sort) {
1315 struct request *__rq; 1323 struct request *__rq;
1316 1324
1317 __rq = list_entry_rq(plug->list.prev); 1325 __rq = list_entry_rq(plug->list.prev);