From: Theodore Ts'o Date: Sat, 19 Apr 2008 13:28:47 +0000 (-0400) Subject: ext2fs_set_gdt_csum: Remove bogus setting of ITABLE_ZEROED X-Git-Tag: v1.41-WIP-0427~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3c5556ed4a6da11d65fe7dd4992291a500da819c;p=tools%2Fe2fsprogs.git ext2fs_set_gdt_csum: Remove bogus setting of ITABLE_ZEROED 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" --- diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c index 0774e00..6fa8dfe 100644 --- a/lib/ext2fs/csum.c +++ b/lib/ext2fs/csum.c @@ -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))