Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd955463 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

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: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent f8d8e579
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",