summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext2fs/ialloc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
index 43deda75..d2b04fc8 100644
--- a/ext2fs/ialloc.c
+++ b/ext2fs/ialloc.c
@@ -57,9 +57,7 @@ diskfs_free_node (struct node *np, mode_t old_mode)
struct ext2_group_desc *gdp;
ino_t inum = np->dn->number;
- if (diskfs_readonly)
- ext2_panic ("diskfs_free_node",
- "Freeing inode %d on a readonly filesystem", inum);
+ assert (!diskfs_readonly)
ext2_debug ("freeing inode %lu\n", inum);
@@ -279,8 +277,7 @@ diskfs_alloc_node (struct node *dir, mode_t mode, struct node **node)
struct node *np;
ino_t inum;
- if (diskfs_readonly)
- return EROFS;
+ assert (!diskfs_readonly);
inum = ext2_alloc_inode (dir->dn->number, mode);