aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-05-30 17:41:39 -0400
committerJens Axboe <axboe@fb.com>2014-05-30 17:41:39 -0400
commitc7bca4183f73f9d013ea8ae572528b48b5e1ee42 (patch)
tree31ec2e1c9250ca2af53a86c3c120cc61bd043c39 /block
parentee3c5db0896d85187b5f31b5482ed8fd308d31ee (diff)
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 <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-timeout.c2
1 files changed, 1 insertions, 1 deletions
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)
224 * modifying the timer because expires for value X 224 * modifying the timer because expires for value X
225 * will be X + something. 225 * will be X + something.
226 */ 226 */
227 if (diff >= HZ / 2) 227 if (!timer_pending(&q->timeout) || (diff >= HZ / 2))
228 mod_timer(&q->timeout, expiry); 228 mod_timer(&q->timeout, expiry);
229 } 229 }
230 230