From: Theodore Ts'o Date: Mon, 1 Jan 2018 23:59:16 +0000 (-0500) Subject: libext2fs: when writing bitmaps mark the fs as dirty if necessary X-Git-Tag: v1.43.8~7 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0cdda6cb753657fcd92f2c02198137bd2a65787a;p=tools%2Fe2fsprogs.git libext2fs: when writing bitmaps mark the fs as dirty if necessary If any checksum fields are updated in the block group descriptors, we need to set the EXT2_FLAG_DIRTY flag so that the block group descriptors are written to disk. Addresses-Debian-Bug: #883869 Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c index ae593d4..9db76eb 100644 --- a/lib/ext2fs/rw_bitmaps.c +++ b/lib/ext2fs/rw_bitmaps.c @@ -94,6 +94,7 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block) if (retval) return retval; ext2fs_group_desc_csum_set(fs, i); + fs->flags |= EXT2_FLAG_DIRTY; blk = ext2fs_block_bitmap_loc(fs, i); if (blk) { @@ -125,6 +126,7 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block) if (retval) goto errout; ext2fs_group_desc_csum_set(fs, i); + fs->flags |= EXT2_FLAG_DIRTY; blk = ext2fs_inode_bitmap_loc(fs, i); if (blk) {