From 24bf8a0b8c1f22c11e844943b38c53fdac111c54 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Mon, 15 Sep 2025 00:17:54 +0100 Subject: [PATCH] Don't offset inodes before initializing the filesystem --- mke2fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mke2fs.c b/mke2fs.c index 789b5c2..466fec0 100644 --- 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; } -- 2.34.1