diff options
author | rsc <devnull@localhost> | 2006-04-19 22:04:00 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-04-19 22:04:00 +0000 |
commit | 90a356572cc47a20e6ef6044c7f14167ab9edd9a (patch) | |
tree | e0e41a448ab1e4d5949bf3d2c734efde9388be9a /src/lib9p | |
parent | 90a99688be7fd813273e1f1f28ba8fa34cb9dc44 (diff) | |
download | plan9port-90a356572cc47a20e6ef6044c7f14167ab9edd9a.tar.gz plan9port-90a356572cc47a20e6ef6044c7f14167ab9edd9a.tar.bz2 plan9port-90a356572cc47a20e6ef6044c7f14167ab9edd9a.zip |
avoid double lock (lucho ionkov)
Diffstat (limited to 'src/lib9p')
-rw-r--r-- | src/lib9p/req.c | 4 | ||||
-rw-r--r-- | src/lib9p/srv.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib9p/req.c b/src/lib9p/req.c index 907db000..b958e191 100644 --- a/src/lib9p/req.c +++ b/src/lib9p/req.c @@ -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: diff --git a/src/lib9p/srv.c b/src/lib9p/srv.c index 29b1ac2d..e75600d3 100644 --- a/src/lib9p/srv.c +++ b/src/lib9p/srv.c @@ -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; |