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);
|
closefid(r->afid);
|
||||||
if(r->oldreq)
|
if(r->oldreq)
|
||||||
closereq(r->oldreq);
|
closereq(r->oldreq);
|
||||||
for(i=0; i<r->nflush; i++)
|
if(r->nflush)
|
||||||
respond(r->flush[i], nil);
|
fprint(2, "closereq: flushes remaining\n");
|
||||||
free(r->flush);
|
free(r->flush);
|
||||||
switch(r->ifcall.type){
|
switch(r->ifcall.type){
|
||||||
case Tstat:
|
case Tstat:
|
||||||
|
|
|
||||||
|
|
@ -856,8 +856,10 @@ if(chatty9p)
|
||||||
free:
|
free:
|
||||||
qlock(&r->lk); /* no one will add flushes now */
|
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);
|
respond(r->flush[i], nil);
|
||||||
|
}
|
||||||
free(r->flush);
|
free(r->flush);
|
||||||
r->nflush = 0;
|
r->nflush = 0;
|
||||||
r->flush = nil;
|
r->flush = nil;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue