Skip to content
Commit a534dbe9 authored by Richard Kennedy's avatar Richard Kennedy Committed by Jens Axboe
Browse files

block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer



blk_rq_timed_out_timer() relied on blk_add_timer() never returning a
timer value of zero, but commit 7838c15b
removed the code that bumped this value when it was zero.
Therefore when jiffies is near wrap we could get unlucky & not set the
timeout value correctly.

This patch uses a flag to indicate that the timeout value was set and so
handles jiffies wrap correctly, and it keeps all the logic in one
function so should be easier to maintain in the future.

Signed-off-by: default avatarRichard Kennedy <richard@rsk.demon.co.uk>
Cc: stable@kernel.org
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 05ce7bfe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment