mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
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>
This commit is contained in:
parent
ee3c5db089
commit
c7bca4183f
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user