From b9bf9f1d547fe819d87d7dbb2ec58bd0b53d711a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 16 Nov 2012 13:42:45 +0100 Subject: hjfs: dentry qid checking, prevent newentry() from allocating already in use slot always check if the directory entry qid from the loc still matches the one on disk before doing anything. helps catching bugs and is basically equivalent to what cwfs does with its checktag. make a haveloc() check in newentry() to make sure we dont allocate a file slot thats still in use, but deleted. this seems to fix the NPROC>1 build problems. --- sys/src/cmd/hjfs/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/src/cmd/hjfs/dump.c') diff --git a/sys/src/cmd/hjfs/dump.c b/sys/src/cmd/hjfs/dump.c index ba6dd5fc0..210e57964 100644 --- a/sys/src/cmd/hjfs/dump.c +++ b/sys/src/cmd/hjfs/dump.c @@ -143,8 +143,8 @@ again: p = getbuf(fs->d, l->next->blk, TDENTRY, 0); if(p == nil) goto err; - d = &p->de[l->next->deind]; - for(i = 0; i < d->size; i++){ + d = getdent(l->next, p); + if(d != nil) for(i = 0; i < d->size; i++){ rc = getblk(fs, l->next, p, i, &r, GBREAD); if(rc <= 0) continue; -- cgit v1.2.3