Skip to content

Commit

Permalink
libata: wrap schedule_timeout_uninterruptible() in loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Oct 12, 2007
1 parent 94ff3d5 commit 9073868
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 9073868

Please sign in to comment.