From 6389d9d4103eaebdd4749cacf475014e525a1c9a Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Wed, 9 Aug 2017 14:16:55 -0400 Subject: [PATCH] nothing much --- bio.c | 2 +- fs.c | 2 +- log.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bio.c b/bio.c index a61ff72915..a45ff3ef0f 100644 --- a/bio.c +++ b/bio.c @@ -99,7 +99,7 @@ bread(uint dev, uint blockno) struct buf *b; b = bget(dev, blockno); - if(!(b->flags & B_VALID)) { + if((b->flags & B_VALID) == 0) { iderw(b); } return b; diff --git a/fs.c b/fs.c index 8fb09efd88..1ada466b10 100644 --- a/fs.c +++ b/fs.c @@ -190,7 +190,7 @@ static struct inode* iget(uint dev, uint inum); //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) diff --git a/log.c b/log.c index 9ba3cedba6..a64c0f6b40 100644 --- a/log.c +++ b/log.c @@ -155,7 +155,9 @@ end_op(void) 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);