1
0
Fork 0

block: ensure that the timer is always added

Commit f793aa5378 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>
hifive-unleashed-5.1
Jens Axboe 2014-05-30 15:41:39 -06:00
parent ee3c5db089
commit c7bca4183f
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}