This fixes an incorrect i_blocks count when using shared blocks.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Google-Bug-Id:
64109868
Change-Id: I44a4997f6a93f2a3fc9aa362fd39d72e7cc9ff84
From AOSP commit:
632cc1f02d47ce54d9f17ca5d80c2d7ba2851020
ext2fs_hashmap_add(fs->block_sha_map, new_block,
new_block->sha, sizeof(new_block->sha));
}
+
+ if (bmap_flags & BMAP_SET) {
+ ext2fs_iblk_add_blocks(fs, &file->inode, 1);
+ ext2fs_write_inode(fs, file->ino, &file->inode);
+ }
}
file->pos += c;