Commit c7bca418 authored by Jens Axboe's avatar Jens Axboe

block: ensure that the timer is always added

Commit f793aa53 relaxed the timer addition a little too much.
If the timer isn't pending, we always need to add it.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent ee3c5db0
...@@ -224,7 +224,7 @@ void blk_add_timer(struct request *req) ...@@ -224,7 +224,7 @@ void blk_add_timer(struct request *req)
* modifying the timer because expires for value X * modifying the timer because expires for value X
* will be X + something. * will be X + something.
*/ */
if (diff >= HZ / 2) if (!timer_pending(&q->timeout) || (diff >= HZ / 2))
mod_timer(&q->timeout, expiry); mod_timer(&q->timeout, expiry);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment