diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index f06354183b29..f8d37a8e2c55 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1037,22 +1037,6 @@ void blk_insert_request(struct request_queue *q, struct request *rq, | |||
1037 | } | 1037 | } |
1038 | EXPORT_SYMBOL(blk_insert_request); | 1038 | EXPORT_SYMBOL(blk_insert_request); |
1039 | 1039 | ||
1040 | /* | ||
1041 | * add-request adds a request to the linked list. | ||
1042 | * queue lock is held and interrupts disabled, as we muck with the | ||
1043 | * request queue list. | ||
1044 | */ | ||
1045 | static inline void add_request(struct request_queue *q, struct request *req) | ||
1046 | { | ||
1047 | drive_stat_acct(req, 1); | ||
1048 | |||
1049 | /* | ||
1050 | * elevator indicated where it wants this request to be | ||
1051 | * inserted at elevator_merge time | ||
1052 | */ | ||
1053 | __elv_add_request(q, req, ELEVATOR_INSERT_SORT, 0); | ||
1054 | } | ||
1055 | |||
1056 | static void part_round_stats_single(int cpu, struct hd_struct *part, | 1040 | static void part_round_stats_single(int cpu, struct hd_struct *part, |
1057 | unsigned long now) | 1041 | unsigned long now) |
1058 | { | 1042 | { |
@@ -1316,7 +1300,10 @@ get_rq: | |||
1316 | req->cpu = blk_cpu_to_group(smp_processor_id()); | 1300 | req->cpu = blk_cpu_to_group(smp_processor_id()); |
1317 | if (queue_should_plug(q) && elv_queue_empty(q)) | 1301 | if (queue_should_plug(q) && elv_queue_empty(q)) |
1318 | blk_plug_device(q); | 1302 | blk_plug_device(q); |
1319 | add_request(q, req); | 1303 | |
1304 | /* insert the request into the elevator */ | ||
1305 | drive_stat_acct(req, 1); | ||
1306 | __elv_add_request(q, req, ELEVATOR_INSERT_SORT, 0); | ||
1320 | out: | 1307 | out: |
1321 | if (unplug || !queue_should_plug(q)) | 1308 | if (unplug || !queue_should_plug(q)) |
1322 | __generic_unplug_device(q); | 1309 | __generic_unplug_device(q); |