Make the cache lock a qlock and not a tas lock. locks are held while trying to lock the cache and qlock would print that the process has locks when calling qlock. making the lock a qlock seems to fix the problem. Reference: /n/sources/patch/applied/cache-qlock Date: Mon Apr 29 18:28:20 CES 2013 Signed-off-by: nemo@lsub.org --- /sys/src/9/port/cache.c Mon Apr 29 18:27:05 2013 +++ /sys/src/9/port/cache.c Mon Apr 29 18:27:00 2013 @@ -39,7 +39,7 @@ typedef struct Cache Cache; struct Cache { - Lock; + QLock; int pgno; Mntcache *head; Mntcache *tail; @@ -223,14 +223,14 @@ return; h = c->qid.path%NHASH; - lock(&cache); + qlock(&cache); for(m = cache.hash[h]; m; m = m->hash) { if(m->qid.path == c->qid.path) if(m->qid.type == c->qid.type) if(m->dev == c->dev && m->type == c->type) { c->mcp = m; ctail(m); - unlock(&cache); + qunlock(&cache); /* File was updated, invalidate cache */ if(m->qid.vers != c->qid.vers) { @@ -267,7 +267,7 @@ c->mcp = m; e = m->list; m->list = 0; - unlock(&cache); + qunlock(&cache); while(e) { next = e->next; @@ -402,7 +402,7 @@ e->start = offset; e->len = l; - lock(&cache); + qlock(&cache); e->bid = cache.pgno; cache.pgno += BY2PG; /* wrap the counter; low bits are unused by pghash but checked by lookpage */ @@ -413,7 +413,7 @@ }else cache.pgno++; } - unlock(&cache); + qunlock(&cache); p->daddr = e->bid; k = kmap(p);