avoid double lock (lucho ionkov)

This commit is contained in:
rsc 2006-04-19 22:04:00 +00:00
parent 90a99688be
commit 90a356572c
2 changed files with 5 additions and 3 deletions

View file

@ -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:

View file

@ -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;