struct buf *b;
b = bget(dev, blockno);
- if(!(b->flags & B_VALID)) {
+ if((b->flags & B_VALID) == 0) {
iderw(b);
}
return b;
//PAGEBREAK!
// Allocate an inode on device dev.
-// Give it type type.
+// Mark it as allocated by giving it type type.
// Returns an unlocked but allocated and referenced inode.
struct inode*
ialloc(uint dev, short type)
do_commit = 1;
log.committing = 1;
} else {
- // begin_op() may be waiting for log space.
+ // begin_op() may be waiting for log space,
+ // and decrementing log.outstanding has decreased
+ // the amount of reserved space.
wakeup(&log);
}
release(&log.lock);