From 0cdda6cb753657fcd92f2c02198137bd2a65787a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 1 Jan 2018 18:59:16 -0500 Subject: [PATCH] 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 --- lib/ext2fs/rw_bitmaps.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 1.8.3.1