From: Jens Axboe <jens.axboe@oracle.com> Date: Thu, 30 Oct 2008 07:53:02 +0000 (+0100) Subject: block: add comment in blk_rq_timed_out() about why next can not be 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65d3618ccfe686e8d7b3f01a838d0578182406df;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git block: add comment in blk_rq_timed_out() about why next can not be 0 Signed-off-by: Jens Axboe <jens.axboe@oracle.com> --- diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 116bbf394fb5..99c3efc706b7 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -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);