Whamcloud - gitweb
ext2fs_set_gdt_csum: Remove setting of BLOCK_UNINIT
authorTheodore Ts'o <tytso@mit.edu>
Sat, 19 Apr 2008 13:47:37 +0000 (09:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 20 Apr 2008 22:31:53 +0000 (18:31 -0400)
This function tried to set BLOCK_UNINIT based on the return value of
ext2fs_super_and_bgd_loc.  That's not something that works once we
start allowing flex_bg since the block group metadata might not be
located in the blockgroup itself.

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

index 6fa8dfe..9ff21c3 100644 (file)
@@ -130,11 +130,6 @@ errcode_t ext2fs_set_gdt_csum(ext2_filsys fs)
                    (ext2fs_bg_has_super(fs, i) && sb->s_reserved_gdt_blocks))
                        goto checksum;
 
-               blks = ext2fs_super_and_bgd_loc(fs, i, 0, 0, 0, 0);
-               if (bg->bg_free_blocks_count == blks &&
-                   bg->bg_flags & EXT2_BG_INODE_UNINIT &&
-                   !(bg->bg_flags & EXT2_BG_BLOCK_UNINIT))
-                       bg->bg_flags |= EXT2_BG_BLOCK_UNINIT;
 checksum:
                ext2fs_group_desc_csum_set(fs, i);
                if (old_flags != bg->bg_flags)