提交 c7bca418 编写于 作者: J 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: NJens Axboe <axboe@fb.com>
上级 ee3c5db0
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册