diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index c973249d68cd..aca5d82ff13c 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1548,13 +1548,6 @@ get_rq: | |||
1548 | if (list_empty(&plug->list)) | 1548 | if (list_empty(&plug->list)) |
1549 | trace_block_plug(q); | 1549 | trace_block_plug(q); |
1550 | else { | 1550 | else { |
1551 | if (!plug->should_sort) { | ||
1552 | struct request *__rq; | ||
1553 | |||
1554 | __rq = list_entry_rq(plug->list.prev); | ||
1555 | if (__rq->q != q) | ||
1556 | plug->should_sort = 1; | ||
1557 | } | ||
1558 | if (request_count >= BLK_MAX_REQUEST_COUNT) { | 1551 | if (request_count >= BLK_MAX_REQUEST_COUNT) { |
1559 | blk_flush_plug_list(plug, false); | 1552 | blk_flush_plug_list(plug, false); |
1560 | trace_block_plug(q); | 1553 | trace_block_plug(q); |
@@ -2888,7 +2881,6 @@ void blk_start_plug(struct blk_plug *plug) | |||
2888 | plug->magic = PLUG_MAGIC; | 2881 | plug->magic = PLUG_MAGIC; |
2889 | INIT_LIST_HEAD(&plug->list); | 2882 | INIT_LIST_HEAD(&plug->list); |
2890 | INIT_LIST_HEAD(&plug->cb_list); | 2883 | INIT_LIST_HEAD(&plug->cb_list); |
2891 | plug->should_sort = 0; | ||
2892 | 2884 | ||
2893 | /* | 2885 | /* |
2894 | * If this is a nested plug, don't actually assign it. It will be | 2886 | * If this is a nested plug, don't actually assign it. It will be |
@@ -2990,10 +2982,7 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) | |||
2990 | 2982 | ||
2991 | list_splice_init(&plug->list, &list); | 2983 | list_splice_init(&plug->list, &list); |
2992 | 2984 | ||
2993 | if (plug->should_sort) { | 2985 | list_sort(NULL, &list, plug_rq_cmp); |
2994 | list_sort(NULL, &list, plug_rq_cmp); | ||
2995 | plug->should_sort = 0; | ||
2996 | } | ||
2997 | 2986 | ||
2998 | q = NULL; | 2987 | q = NULL; |
2999 | depth = 0; | 2988 | depth = 0; |