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>
This commit is contained in:
Tejun Heo 2007-10-31 10:17:02 +09:00 коммит произвёл Jeff Garzik
Родитель f8d8e5799b
Коммит cd955463bb
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -2204,7 +2204,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
unsigned long now = jiffies;
if (time_before(now, deadline)) {
unsigned long delta = deadline - jiffies;
unsigned long delta = deadline - now;
ata_link_printk(link, KERN_WARNING, "reset failed "
"(errno=%d), retrying in %u secs\n",