diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 1d94f15d7f0d..4b1b29ef2cb0 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -451,6 +451,7 @@ void blk_cleanup_queue(struct request_queue *q) | |||
451 | */ | 451 | */ |
452 | blk_sync_queue(q); | 452 | blk_sync_queue(q); |
453 | 453 | ||
454 | del_timer_sync(&q->backing_dev_info.laptop_mode_wb_timer); | ||
454 | mutex_lock(&q->sysfs_lock); | 455 | mutex_lock(&q->sysfs_lock); |
455 | queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q); | 456 | queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q); |
456 | mutex_unlock(&q->sysfs_lock); | 457 | mutex_unlock(&q->sysfs_lock); |
@@ -511,6 +512,8 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) | |||
511 | return NULL; | 512 | return NULL; |
512 | } | 513 | } |
513 | 514 | ||
515 | setup_timer(&q->backing_dev_info.laptop_mode_wb_timer, | ||
516 | laptop_mode_timer_fn, (unsigned long) q); | ||
514 | init_timer(&q->unplug_timer); | 517 | init_timer(&q->unplug_timer); |
515 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); | 518 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); |
516 | INIT_LIST_HEAD(&q->timeout_list); | 519 | INIT_LIST_HEAD(&q->timeout_list); |
@@ -2101,7 +2104,7 @@ static void blk_finish_request(struct request *req, int error) | |||
2101 | BUG_ON(blk_queued_rq(req)); | 2104 | BUG_ON(blk_queued_rq(req)); |
2102 | 2105 | ||
2103 | if (unlikely(laptop_mode) && blk_fs_request(req)) | 2106 | if (unlikely(laptop_mode) && blk_fs_request(req)) |
2104 | laptop_io_completion(); | 2107 | laptop_io_completion(&req->q->backing_dev_info); |
2105 | 2108 | ||
2106 | blk_delete_timer(req); | 2109 | blk_delete_timer(req); |
2107 | 2110 | ||