mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
avoid double lock (lucho ionkov)
This commit is contained in:
parent
90a99688be
commit
90a356572c
2 changed files with 5 additions and 3 deletions
|
@ -84,8 +84,8 @@ if(chatty9p > 1)
|
|||
closefid(r->afid);
|
||||
if(r->oldreq)
|
||||
closereq(r->oldreq);
|
||||
for(i=0; i<r->nflush; i++)
|
||||
respond(r->flush[i], nil);
|
||||
if(r->nflush)
|
||||
fprint(2, "closereq: flushes remaining\n");
|
||||
free(r->flush);
|
||||
switch(r->ifcall.type){
|
||||
case Tstat:
|
||||
|
|
|
@ -856,8 +856,10 @@ if(chatty9p)
|
|||
free:
|
||||
qlock(&r->lk); /* no one will add flushes now */
|
||||
|
||||
for(i=0; i<r->nflush; i++)
|
||||
for(i=0; i<r->nflush; i++){
|
||||
r->flush[i]->oldreq = nil; /* so it doesn't try to lock us! */
|
||||
respond(r->flush[i], nil);
|
||||
}
|
||||
free(r->flush);
|
||||
r->nflush = 0;
|
||||
r->flush = nil;
|
||||
|
|
Loading…
Reference in a new issue