summaryrefslogtreecommitdiff
path: root/fs.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-06 17:50:20 +0000
committerrsc <rsc>2006-09-06 17:50:20 +0000
commitf552738889f56586728d1b5d2a63cde0cf124929 (patch)
treee91c4b41699f12d686383556fbbe67baa41d9575 /fs.c
parent9e9bcaf143bf8507e947f9934371744c3d50a8ea (diff)
downloadxv6-labs-f552738889f56586728d1b5d2a63cde0cf124929.tar.gz
xv6-labs-f552738889f56586728d1b5d2a63cde0cf124929.tar.bz2
xv6-labs-f552738889f56586728d1b5d2a63cde0cf124929.zip
no /* */ comments
Diffstat (limited to 'fs.c')
-rw-r--r--fs.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs.c b/fs.c
index eb7b828..132fddb 100644
--- a/fs.c
+++ b/fs.c
@@ -24,9 +24,7 @@ iinit(void)
initlock(&inode_table_lock, "inode_table");
}
-/*
- * allocate a disk block
- */
+// Allocate a disk block.
static uint
balloc(uint dev)
{
@@ -90,11 +88,11 @@ bfree(int dev, uint b)
brelse(bp);
}
-/*
- * fetch an inode, from the in-core table if it's already
- * in use, otherwise read from the disk.
- * returns an inode with busy set and incremented reference count.
- */
+// Find the inode with number inum on device dev
+// and return an in-memory copy. Loads the inode
+// from disk into the in-core table if necessary.
+// The returned inode has busy set and has its ref count incremented.
+// Caller must iput the return value when done with it.
struct inode*
iget(uint dev, uint inum)
{