Skip to content

Commit

Permalink
block: ensure that the timer is always added
Browse files Browse the repository at this point in the history
Commit f793aa5 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 <[email protected]>
  • Loading branch information
axboe committed May 30, 2014
1 parent ee3c5db commit c7bca41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit c7bca41

Please sign in to comment.