diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-16 13:42:45 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-16 13:42:45 +0100 |
commit | b9bf9f1d547fe819d87d7dbb2ec58bd0b53d711a (patch) | |
tree | d907e23196cc187295dd99b16e3e94293e7ddb62 /sys/src/cmd/hjfs/dump.c | |
parent | ffa6f9c6ea8ce11c7ed895d5efb1458f256106fd (diff) |
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.
Diffstat (limited to 'sys/src/cmd/hjfs/dump.c')
-rw-r--r-- | sys/src/cmd/hjfs/dump.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |