aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index f25eb9786d94..d768a8ddc173 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -110,6 +110,7 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
110 memset(rq, 0, sizeof(*rq)); 110 memset(rq, 0, sizeof(*rq));
111 111
112 INIT_LIST_HEAD(&rq->queuelist); 112 INIT_LIST_HEAD(&rq->queuelist);
113 INIT_LIST_HEAD(&rq->timeout_list);
113 rq->cpu = -1; 114 rq->cpu = -1;
114 rq->q = q; 115 rq->q = q;
115 rq->sector = rq->hard_sector = (sector_t) -1; 116 rq->sector = rq->hard_sector = (sector_t) -1;
@@ -490,6 +491,8 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
490 } 491 }
491 492
492 init_timer(&q->unplug_timer); 493 init_timer(&q->unplug_timer);
494 setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q);
495 INIT_LIST_HEAD(&q->timeout_list);
493 496
494 kobject_init(&q->kobj, &blk_queue_ktype); 497 kobject_init(&q->kobj, &blk_queue_ktype);
495 498
@@ -897,6 +900,8 @@ EXPORT_SYMBOL(blk_start_queueing);
897 */ 900 */
898void blk_requeue_request(struct request_queue *q, struct request *rq) 901void blk_requeue_request(struct request_queue *q, struct request *rq)
899{ 902{
903 blk_delete_timer(rq);
904 blk_clear_rq_complete(rq);
900 blk_add_trace_rq(q, rq, BLK_TA_REQUEUE); 905 blk_add_trace_rq(q, rq, BLK_TA_REQUEUE);
901 906
902 if (blk_rq_tagged(rq)) 907 if (blk_rq_tagged(rq))
@@ -1650,6 +1655,8 @@ static void end_that_request_last(struct request *req, int error)
1650{ 1655{
1651 struct gendisk *disk = req->rq_disk; 1656 struct gendisk *disk = req->rq_disk;
1652 1657
1658 blk_delete_timer(req);
1659
1653 if (blk_rq_tagged(req)) 1660 if (blk_rq_tagged(req))
1654 blk_queue_end_tag(req->q, req); 1661 blk_queue_end_tag(req->q, req);
1655 1662