diff options
author | Tejun Heo <htejun@gmail.com> | 2007-10-09 14:58:33 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:46 -0400 |
commit | 9073868376ed5fa1f247327ccb2e6f766d5b7eed (patch) | |
tree | ad79d7da02173e99c300988dfefbdf8fc1081088 /drivers/ata/libata-eh.c | |
parent | 94ff3d54080975686a3c41e73b8926030ee0c31f (diff) |
libata: wrap schedule_timeout_uninterruptible() in loop
Tasks in uninterruptible sleep might be woken up by unrelated events
and should check whether the condition it was waiting for has actually
triggered. Wrap schedule_timeout_uninterruptible() in loop to achieve
it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 866ac9d5530a..8aa61403303f 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2183,7 +2183,8 @@ int ata_eh_reset(struct ata_link *link, int classify, "(errno=%d), retrying in %u secs\n", rc, (jiffies_to_msecs(delta) + 999) / 1000); - schedule_timeout_uninterruptible(delta); + while (delta) + delta = schedule_timeout_uninterruptible(delta); } if (rc == -EPIPE || |