Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7bca418 authored by Jens Axboe's avatar Jens Axboe
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}