aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe2008-10-30 02:53:02 -0500
committerJens Axboe2008-12-29 01:28:42 -0600
commit65d3618ccfe686e8d7b3f01a838d0578182406df (patch)
tree0a53a7d3649eb82a8e2af2c9f4e8de2d9b1b6616 /block/blk-timeout.c
parent565e411d764eeda006738dfadbccca79d48381e1 (diff)
downloadkernel-common-65d3618ccfe686e8d7b3f01a838d0578182406df.tar.gz
kernel-common-65d3618ccfe686e8d7b3f01a838d0578182406df.tar.xz
kernel-common-65d3618ccfe686e8d7b3f01a838d0578182406df.zip
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 116bbf394fb..99c3efc706b 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -132,7 +132,12 @@ void blk_rq_timed_out_timer(unsigned long data)
132 } 132 }
133 } 133 }
134 134
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)
136 mod_timer(&q->timeout, round_jiffies_up(next)); 141 mod_timer(&q->timeout, round_jiffies_up(next));
137 142
138 spin_unlock_irqrestore(q->queue_lock, flags); 143 spin_unlock_irqrestore(q->queue_lock, flags);