From: Theodore Ts'o Date: Mon, 26 Mar 2012 02:24:10 +0000 (-0400) Subject: libext2fs: update dirty flags if the uninit flags are cleared X-Git-Tag: v1.42.2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=538eb8784a2c6cac28c539f545fa3bf6fea3246f;p=thirdparty%2Fe2fsprogs.git libext2fs: update dirty flags if the uninit flags are cleared Update the block group descriptor checksum and mark the superblock and allocation bitmaps as dirty in check_inode_uninit() and check_block_uninit(). Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c index 752c4da16..775dfcc47 100644 --- a/lib/ext2fs/alloc.c +++ b/lib/ext2fs/alloc.c @@ -73,6 +73,8 @@ static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map, } ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); ext2fs_group_desc_csum_set(fs, group); + ext2fs_mark_super_dirty(fs); + ext2fs_mark_bb_dirty(fs); } /* @@ -93,6 +95,9 @@ static void check_inode_uninit(ext2_filsys fs, ext2fs_inode_bitmap map, ext2fs_fast_unmark_inode_bitmap2(map, ino); ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT); + ext2fs_group_desc_csum_set(fs, group); + ext2fs_mark_ib_dirty(fs); + ext2fs_mark_super_dirty(fs); check_block_uninit(fs, fs->block_map, group); }