]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
block: add comment in blk_rq_timed_out() about why next can not be 0
authorJens Axboe <jens.axboe@oracle.com>
Thu, 30 Oct 2008 07:53:02 +0000 (08:53 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:28:42 +0000 (08:28 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-timeout.c

index 116bbf394fb53d7a5ed8499af6fd59e76d31e94b..99c3efc706b7de0e1de606b455fcbea1e4559b4c 100644 (file)
@@ -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);