diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
commit | 278554bd6579206921f5d8a523649a7a57f8850d (patch) | |
tree | 4e6c527daf0910e455b3aa72e2c96b0479e430be /block/blk-timeout.c | |
parent | 5a147e8bf982f9dd414c1dd751fe02c1942506b2 (diff) | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ar9170/usb.c
drivers/scsi/iscsi_tcp.c
net/ipv4/ipmr.c
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r-- | block/blk-timeout.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 1ba7e0aca878..4f0c06c7a338 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c | |||
@@ -109,6 +109,7 @@ void blk_rq_timed_out_timer(unsigned long data) | |||
109 | struct request_queue *q = (struct request_queue *) data; | 109 | struct request_queue *q = (struct request_queue *) data; |
110 | unsigned long flags, next = 0; | 110 | unsigned long flags, next = 0; |
111 | struct request *rq, *tmp; | 111 | struct request *rq, *tmp; |
112 | int next_set = 0; | ||
112 | 113 | ||
113 | spin_lock_irqsave(q->queue_lock, flags); | 114 | spin_lock_irqsave(q->queue_lock, flags); |
114 | 115 | ||
@@ -122,16 +123,13 @@ void blk_rq_timed_out_timer(unsigned long data) | |||
122 | if (blk_mark_rq_complete(rq)) | 123 | if (blk_mark_rq_complete(rq)) |
123 | continue; | 124 | continue; |
124 | blk_rq_timed_out(rq); | 125 | blk_rq_timed_out(rq); |
125 | } else if (!next || time_after(next, rq->deadline)) | 126 | } else if (!next_set || time_after(next, rq->deadline)) { |
126 | next = rq->deadline; | 127 | next = rq->deadline; |
128 | next_set = 1; | ||
129 | } | ||
127 | } | 130 | } |
128 | 131 | ||
129 | /* | 132 | if (next_set) |
130 | * next can never be 0 here with the list non-empty, since we always | ||
131 | * bump ->deadline to 1 so we can detect if the timer was ever added | ||
132 | * or not. See comment in blk_add_timer() | ||
133 | */ | ||
134 | if (next) | ||
135 | mod_timer(&q->timeout, round_jiffies_up(next)); | 133 | mod_timer(&q->timeout, round_jiffies_up(next)); |
136 | 134 | ||
137 | spin_unlock_irqrestore(q->queue_lock, flags); | 135 | spin_unlock_irqrestore(q->queue_lock, flags); |