summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2010-07-23 12:52:50 -0400
committerFrans Kaashoek <[email protected]>2010-07-23 12:52:50 -0400
commitaf03ab142de8c68ad56a829e39e8faee9db252d3 (patch)
tree8517990a5de9760ba840dcc5abbda0d2162f6615
parentb364c4b88156919949aa6f3c805efae009e7459b (diff)
downloadxv6-labs-af03ab142de8c68ad56a829e39e8faee9db252d3.tar.gz
xv6-labs-af03ab142de8c68ad56a829e39e8faee9db252d3.tar.bz2
xv6-labs-af03ab142de8c68ad56a829e39e8faee9db252d3.zip
a few nits
passes all tests on two-processor smp
-rw-r--r--bio.c1
-rw-r--r--exec.c2
-rw-r--r--kalloc.c2
3 files changed, 1 insertions, 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;
}