Skip to content

Commit

Permalink
block: add comment in blk_rq_timed_out() about why next can not be 0
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Dec 29, 2008
1 parent 565e411 commit 65d3618
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ void blk_rq_timed_out_timer(unsigned long data)
}
}

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

spin_unlock_irqrestore(q->queue_lock, flags);
Expand Down

0 comments on commit 65d3618

Please sign in to comment.