From af03ab142de8c68ad56a829e39e8faee9db252d3 Mon Sep 17 00:00:00 2001
From: Frans Kaashoek <kaashoek@31-34-210.wireless.csail.mit.edu>
Date: Fri, 23 Jul 2010 12:52:50 -0400
Subject: [PATCH] a few nits passes all tests on two-processor smp

---
 bio.c    | 1 -
 exec.c   | 2 +-
 kalloc.c | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/bio.c b/bio.c
index c746478..6a3968b 100644
--- a/bio.c
+++ b/bio.c
@@ -109,7 +109,6 @@ bread(uint dev, uint sector)
 void
 bwrite(struct buf *b)
 {
-  cprintf("bwrite sector %d\n", b->sector);
   if((b->flags & B_BUSY) == 0)
     panic("bwrite");
   b->flags |= B_DIRTY;
diff --git a/exec.c b/exec.c
index 6ded59f..8a92e99 100644
--- a/exec.c
+++ b/exec.c
@@ -102,7 +102,7 @@ exec(char *path, char **argv)
   return 0;
 
  bad:
-  freevm(pgdir);
+  if (pgdir) freevm(pgdir);
   iunlockput(ip);
   return -1;
 }
diff --git a/kalloc.c b/kalloc.c
index 7f47853..5661105 100644
--- a/kalloc.c
+++ b/kalloc.c
@@ -111,8 +111,6 @@ kalloc(int n)
     }
   }
   release(&kmem.lock);
-
-  cprintf("kalloc: out of memory\n");
   return 0;
 }
 
-- 
GitLab