Browse Source

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>
Tejun Heo 17 năm trước cách đây
mục cha
commit
9073868376
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      drivers/ata/libata-eh.c

+ 2 - 1
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 ||