From: Tejun Heo Date: Wed, 31 Oct 2007 01:17:02 +0000 (+0900) Subject: libata: fix timing computation in ata_eh_reset() X-Git-Tag: v2.6.24-rc2~48^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd955463bb4e96cfec18a0e5b6887c6797fb821d;p=linux-2.6 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 8d64f8fd8f..53b2348a36 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, 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",