diff options
author | Tejun Heo <htejun@gmail.com> | 2007-10-30 21:17:02 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-11-03 08:46:54 -0400 |
commit | cd955463bb4e96cfec18a0e5b6887c6797fb821d (patch) | |
tree | c55ee46b45751e4cf1f4fe6595784add305d91d5 /drivers | |
parent | f8d8e5799b75cf7ad530d2bf2a42229bf7360526 (diff) |
libata: fix timing computation in ata_eh_reset()
As jiffies changes asynchronously, it needs to be cached if unchanging
timestamp is needed. The code in ata_eh_reset() intended to do that
with @now but never actually did it. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-eh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 8d64f8fd8f1d..53b2348a364d 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2204,7 +2204,7 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2204 | unsigned long now = jiffies; | 2204 | unsigned long now = jiffies; |
2205 | 2205 | ||
2206 | if (time_before(now, deadline)) { | 2206 | if (time_before(now, deadline)) { |
2207 | unsigned long delta = deadline - jiffies; | 2207 | unsigned long delta = deadline - now; |
2208 | 2208 | ||
2209 | ata_link_printk(link, KERN_WARNING, "reset failed " | 2209 | ata_link_printk(link, KERN_WARNING, "reset failed " |
2210 | "(errno=%d), retrying in %u secs\n", | 2210 | "(errno=%d), retrying in %u secs\n", |