diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-12 13:53:43 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 13:53:43 +0300 |
commit | e18d7af85296cb6999aae171e8a9f8612bea5ae0 (patch) | |
tree | 97a675ecc17bef2f710c50f5ea2a480df0e362c0 /block/blk-timeout.c | |
parent | 3555105333ae55414d0fe051557bd7dc590f5255 (diff) | |
parent | 8b1fae4e4200388b64dd88065639413cb3f1051c (diff) | |
download | linux-e18d7af85296cb6999aae171e8a9f8612bea5ae0.tar.xz |
Merge commit 'v2.6.28-rc8' into x86/mm
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r-- | block/blk-timeout.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 972a63f848fb..69185ea9fae2 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -75,14 +75,7 @@ void blk_delete_timer(struct request *req) { struct request_queue *q = req->q; - /* - * Nothing to detach - */ - if (!q->rq_timed_out_fn || !req->deadline) - return; - list_del_init(&req->timeout_list); - if (list_empty(&q->timeout_list)) del_timer(&q->timeout); } @@ -142,7 +135,7 @@ void blk_rq_timed_out_timer(unsigned long data) } if (next_set && !list_empty(&q->timeout_list)) - mod_timer(&q->timeout, round_jiffies(next)); + mod_timer(&q->timeout, round_jiffies_up(next)); spin_unlock_irqrestore(q->queue_lock, flags); } @@ -198,17 +191,10 @@ void blk_add_timer(struct request *req) /* * If the timer isn't already pending or this timeout is earlier - * than an existing one, modify the timer. Round to next nearest + * than an existing one, modify the timer. Round up to next nearest * second. */ - expiry = round_jiffies(req->deadline); - - /* - * We use ->deadline == 0 to detect whether a timer was added or - * not, so just increase to next jiffy for that specific case - */ - if (unlikely(!req->deadline)) - req->deadline = 1; + expiry = round_jiffies_up(req->deadline); if (!timer_pending(&q->timeout) || time_before(expiry, q->timeout.expires)) |