]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: make sure bg 0's unused inode count field is zero'ed for mke2fs -S
authorTheodore Ts'o <tytso@mit.edu>
Mon, 27 Feb 2012 05:51:39 +0000 (00:51 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 27 Feb 2012 05:51:39 +0000 (00:51 -0500)
There was a bug/typo in commit ba9e0afc5 which caused the first block
group (bg #0) to not have its unused inode count field to get set to
zero in the case of mke2fs -S.  This caused inodes in the first block
group to not be recoverable via mke2fs -S.  Oops.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c

index c70c1b422abfd5e3c2b6351d92984435628cc269..51435d25d0d96c19e7250d71509cf095701d525b 100644 (file)
@@ -2442,7 +2442,7 @@ int main (int argc, char *argv[])
                 */
                if (fs->super->s_feature_ro_compat &
                    EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
-                       for (i = 1; i < fs->group_desc_count; i++)
+                       for (i = 0; i < fs->group_desc_count; i++)
                                ext2fs_bg_itable_unused_set(fs, i, 0);
                }
        } else {