From b9715c15660253a283a80a54a738af9244deb7b9 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 30 Oct 2023 20:38:59 -0400 Subject: [PATCH] ext2: fix invalid superblock writes --- fs/ext2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ext2.c b/fs/ext2.c index cc3f623..27c4ad6 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -484,7 +484,6 @@ static long ext2_alloc_inode(struct fs *vfs, uint32_t mode) /* update superblock and bgdt */ fs->sb.free_inodes_count--; - fs->sb.inodes_count++; bg->free_inodes_count--; @@ -552,7 +551,6 @@ static int ext2_free_inode(struct fs *vfs, ino_t ino_num) /* update superblock and bgdt */ fs->sb.free_inodes_count++; - fs->sb.inodes_count--; bg->free_inodes_count++;