From 08b0c35636b66d021bd8f760ee2fb73d230ff9c2 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 30 May 2014 15:41:39 -0600 Subject: [PATCH] block: ensure that the timer is always added Commit 165321ad0708 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 --- block/blk-timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 43e8b515806f2..95a09590ccfda 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); } -- 2.39.5