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:
parent
c4c8a3e041
commit
15749e8d06
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121036
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user