Whamcloud - gitweb
ext2fs_set_gdt_csum: Remove bogus setting of ITABLE_ZEROED
authorTheodore Ts'o <tytso@mit.edu>
Sat, 19 Apr 2008 13:28:47 +0000 (09:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 20 Apr 2008 22:31:53 +0000 (18:31 -0400)
It used to be the case that ext2fs_set_gdt_csum set the ITABLE_ZEROED
flag if the INODE_UNINIT is not set.  This assumed that the only
caller of ext2fs_set_gdt_csum was e2fsck (which was not true), and
that e2fsck would take care of zeroing the inode table (whic was also
not true).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/csum.c

index 0774e00..6fa8dfe 100644 (file)
@@ -110,16 +110,6 @@ errcode_t ext2fs_set_gdt_csum(ext2_filsys fs)
                int old_unused = bg->bg_itable_unused;
                int old_flags = bg->bg_flags;
 
-               /* Even if it wasn't zeroed, by the time this function is
-                * called by e2fsck we have already scanned and corrected
-                * the whole inode table so we may as well not overwrite it.
-                * This is just a hint to the kernel that it could do lazy
-                * zeroing of the inode table if mke2fs didn't do it, to help
-                * out if we need to do a full itable scan sometime later. */
-               if (!(bg->bg_flags & (EXT2_BG_INODE_UNINIT |
-                                     EXT2_BG_INODE_ZEROED)))
-                       fs->group_desc[i].bg_flags |= EXT2_BG_INODE_ZEROED;
-
                if (bg->bg_free_inodes_count == sb->s_inodes_per_group &&
                    i > 0 && (i < fs->group_desc_count - 1 || csum_flag)) {
                        if (!(bg->bg_flags & EXT2_BG_INODE_UNINIT))