diff options
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r-- | block/blk-timeout.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 69185ea9fae2..116bbf394fb5 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c | |||
@@ -111,7 +111,7 @@ static void blk_rq_timed_out(struct request *req) | |||
111 | void blk_rq_timed_out_timer(unsigned long data) | 111 | void blk_rq_timed_out_timer(unsigned long data) |
112 | { | 112 | { |
113 | struct request_queue *q = (struct request_queue *) data; | 113 | struct request_queue *q = (struct request_queue *) data; |
114 | unsigned long flags, uninitialized_var(next), next_set = 0; | 114 | unsigned long flags, next = 0; |
115 | struct request *rq, *tmp; | 115 | struct request *rq, *tmp; |
116 | 116 | ||
117 | spin_lock_irqsave(q->queue_lock, flags); | 117 | spin_lock_irqsave(q->queue_lock, flags); |
@@ -126,12 +126,10 @@ void blk_rq_timed_out_timer(unsigned long data) | |||
126 | if (blk_mark_rq_complete(rq)) | 126 | if (blk_mark_rq_complete(rq)) |
127 | continue; | 127 | continue; |
128 | blk_rq_timed_out(rq); | 128 | blk_rq_timed_out(rq); |
129 | } else { | ||
130 | if (!next || time_after(next, rq->deadline)) | ||
131 | next = rq->deadline; | ||
129 | } | 132 | } |
130 | if (!next_set) { | ||
131 | next = rq->deadline; | ||
132 | next_set = 1; | ||
133 | } else if (time_after(next, rq->deadline)) | ||
134 | next = rq->deadline; | ||
135 | } | 133 | } |
136 | 134 | ||
137 | if (next_set && !list_empty(&q->timeout_list)) | 135 | if (next_set && !list_empty(&q->timeout_list)) |