diff options
Diffstat (limited to 'fs.c')
-rw-r--r-- | fs.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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) { |