summaryrefslogtreecommitdiff
path: root/kernel/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs.c')
-rw-r--r--kernel/fs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/fs.c b/kernel/fs.c
index b220491..dea5864 100644
--- a/kernel/fs.c
+++ b/kernel/fs.c
@@ -193,7 +193,8 @@ static struct inode* iget(uint dev, uint inum);
// Allocate an inode on device dev.
// Mark it as allocated by giving it type type.
-// Returns an unlocked but allocated and referenced inode.
+// Returns an unlocked but allocated and referenced inode,
+// or NULL if there is no free inode..
struct inode*
ialloc(uint dev, short type)
{
@@ -213,7 +214,8 @@ ialloc(uint dev, short type)
}
brelse(bp);
}
- panic("ialloc: no inodes");
+ printf("ialloc: no inodes\n");
+ return 0;
}
// Copy a modified in-memory inode to disk.