Skip to content

Commit 65d3618

Browse files
author
Jens Axboe
committed
block: add comment in blk_rq_timed_out() about why next can not be 0
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent 565e411 commit 65d3618

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎block/blk-timeout.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ void blk_rq_timed_out_timer(unsigned long data)
132132
}
133133
}
134134

135-
if (next_set && !list_empty(&q->timeout_list))
135+
/*
136+
* next can never be 0 here with the list non-empty, since we always
137+
* bump ->deadline to 1 so we can detect if the timer was ever added
138+
* or not. See comment in blk_add_timer()
139+
*/
140+
if (next)
136141
mod_timer(&q->timeout, round_jiffies_up(next));
137142

138143
spin_unlock_irqrestore(q->queue_lock, flags);

0 commit comments

Comments
 (0)