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/buf.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/buf.c')
-rw-r--r-- | sys/src/cmd/hjfs/buf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/hjfs/buf.c b/sys/src/cmd/hjfs/buf.c index 23f533520..51fdff162 100644 --- a/sys/src/cmd/hjfs/buf.c +++ b/sys/src/cmd/hjfs/buf.c @@ -269,7 +269,8 @@ getbuf(Dev *d, uvlong off, int type, int nodata) if(nodata) b->type = type; if(b->type != type && type != -1){ - dprint("hjfs: type mismatch, dev %s, block %lld, got %T, want %T, caller %#p\n", d->name, off, b->type, type, getcallerpc(&d)); + dprint("hjfs: type mismatch, dev %s, block %lld, got %T, want %T, caller %#p\n", + d->name, off, b->type, type, getcallerpc(&d)); werrstr("phase error -- type mismatch"); putbuf(b); return nil; |