From: Jens Axboe Date: Fri, 30 May 2014 21:41:39 +0000 (-0600) Subject: block: ensure that the timer is always added X-Git-Tag: firefly_0821_release~176^2~3465^2~52^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c7bca4183f73f9d013ea8ae572528b48b5e1ee42;p=firefly-linux-kernel-4.4.55.git block: ensure that the timer is always added Commit f793aa537866 relaxed the timer addition a little too much. If the timer isn't pending, we always need to add it. Signed-off-by: Jens Axboe --- diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 43e8b515806f..95a09590ccfd 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -224,7 +224,7 @@ void blk_add_timer(struct request *req) * modifying the timer because expires for value X * will be X + something. */ - if (diff >= HZ / 2) + if (!timer_pending(&q->timeout) || (diff >= HZ / 2)) mod_timer(&q->timeout, expiry); }