summaryrefslogtreecommitdiff
path: root/block/blk-timeout.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-10-30 08:53:02 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-12-03 13:01:33 +0100
commit0bd2e01799f78eca158d6918ce77fa265d79ce2f (patch)
treef067367f27a59c016fe84c41694264e9223b0e24 /block/blk-timeout.c
parentde32f994dcb6ccdb8700a0279d304cb05bce9c38 (diff)
block: add comment in blk_rq_timed_out() about why next can not be 0
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r--block/blk-timeout.c7
1 files changed, 6 insertions, 1 deletions
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);