1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Avoid potential race on ATA_R_DONE.

This commit is contained in:
Søren Schmidt 2003-10-12 12:38:03 +00:00
parent c4c8a3e041
commit 15749e8d06
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121036

View File

@ -97,8 +97,9 @@ ata_queue_request(struct ata_request *request)
return;
/* if this is not a callback and we havn't seen DONE yet -> sleep */
if (!request->callback && !(request->flags & ATA_R_DONE)) {
while (tsleep(request, PRIBIO, "atareq", 60*10*hz)) ;
if (!request->callback) {
while (!(request->flags & ATA_R_DONE))
tsleep(request, PRIBIO, "atareq", hz/10);
}
}