commit 90a356572cc47a20e6ef6044c7f14167ab9edd9a from: rsc date: Wed Apr 19 22:04:00 2006 UTC avoid double lock (lucho ionkov) commit - 90a99688be7fd813273e1f1f28ba8fa34cb9dc44 commit + 90a356572cc47a20e6ef6044c7f14167ab9edd9a blob - 907db000120f80d1660e3ab115d3e0d1574bed1a blob + b958e191dfdf479d456deaa1d67f3f869829f0e3 --- src/lib9p/req.c +++ src/lib9p/req.c @@ -84,8 +84,8 @@ if(chatty9p > 1) closefid(r->afid); if(r->oldreq) closereq(r->oldreq); - for(i=0; inflush; i++) - respond(r->flush[i], nil); + if(r->nflush) + fprint(2, "closereq: flushes remaining\n"); free(r->flush); switch(r->ifcall.type){ case Tstat: blob - 29b1ac2d636442dc612a91d16ac00b5e5b0752df blob + e75600d3301ef18482ede417ed965a220741e2b8 --- src/lib9p/srv.c +++ src/lib9p/srv.c @@ -856,8 +856,10 @@ if(chatty9p) free: qlock(&r->lk); /* no one will add flushes now */ - for(i=0; inflush; i++) + for(i=0; inflush; 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;