Don't offset inodes before initializing the filesystem
authorRobert Pengelly <robertapengelly@hotmail.com>
Sun, 14 Sep 2025 23:17:54 +0000 (00:17 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Sun, 14 Sep 2025 23:17:54 +0000 (00:17 +0100)
mke2fs.c

index 789b5c270746f2ea0088ecb2730593613a0c8a7f..466fec010be7576d65c8753c7c0f97a678d00386 100644 (file)
--- a/mke2fs.c
+++ b/mke2fs.c
@@ -659,7 +659,9 @@ int main (int argc, char **argv) {
     
     }
     
-    if ((nbinodes = nbblocks - EXT2_FIRST_INO - 1) < EXT2_FIRST_INO - 1) {
+    nbinodes = nbblocks;
+    
+    if (nbinodes < EXT2_FIRST_INO - 1) {
         nbinodes = EXT2_FIRST_INO - 1;
     }