* [PATCH] libata: wrap schedule_timeout_uninterruptible() in loop
@ 2007-10-09 5:58 Tejun Heo
2007-10-10 1:41 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2007-10-09 5:58 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
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>
---
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 866ac9d..8aa6140 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 ||
--
1.5.0.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libata: wrap schedule_timeout_uninterruptible() in loop
2007-10-09 5:58 [PATCH] libata: wrap schedule_timeout_uninterruptible() in loop Tejun Heo
@ 2007-10-10 1:41 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-10-10 1:41 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> 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>
> ---
> drivers/ata/libata-eh.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-10 1:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 5:58 [PATCH] libata: wrap schedule_timeout_uninterruptible() in loop Tejun Heo
2007-10-10 1:41 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).