cryptfs: Skip to encrtypt unused blocks into a block group which uninitialize block bitmap .

Bug: 198288

Change-Id: Iaa1a14fd916ddec8dc1a4be18d49732ebcba6884
Signed-off-by: liminghao <liminghao@xiaomi.com>
This commit is contained in:
liminghao 2016-01-06 10:30:49 +08:00
parent f570ded508
commit aa08e58e3a

View file

@ -2371,7 +2371,8 @@ static int encrypt_groups(struct encryptGroupsData* data)
data->count = 0;
for (block = 0; block < block_count; block++) {
int used = bitmap_get_bit(block_bitmap, block);
int used = (aux_info.bg_desc[i].bg_flags & EXT4_BG_BLOCK_UNINIT) ?
0 : bitmap_get_bit(block_bitmap, block);
update_progress(data, used);
if (used) {
if (data->count == 0) {