From 538eb8784a2c6cac28c539f545fa3bf6fea3246f Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 25 Mar 2012 22:24:10 -0400 Subject: [PATCH] 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" --- lib/ext2fs/alloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c index 752c4da..775dfcc 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); } -- 1.8.3.1