aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/resize.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r--fs/ext4/resize.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index dc597e066308..a58ce7c507ae 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1160,7 +1160,7 @@ static int ext4_setup_new_descs(handle_t *handle, struct super_block *sb,
1160 EXT4_B2C(sbi, group_data->free_blocks_count)); 1160 EXT4_B2C(sbi, group_data->free_blocks_count));
1161 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb)); 1161 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb));
1162 gdp->bg_flags = cpu_to_le16(*bg_flags); 1162 gdp->bg_flags = cpu_to_le16(*bg_flags);
1163 gdp->bg_checksum = ext4_group_desc_csum(sbi, group, gdp); 1163 ext4_group_desc_csum_set(sb, group, gdp);
1164 1164
1165 err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh); 1165 err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh);
1166 if (unlikely(err)) { 1166 if (unlikely(err)) {
@@ -1399,17 +1399,14 @@ static int ext4_setup_next_flex_gd(struct super_block *sb,
1399 (1 + ext4_bg_num_gdb(sb, group + i) + 1399 (1 + ext4_bg_num_gdb(sb, group + i) +
1400 le16_to_cpu(es->s_reserved_gdt_blocks)) : 0; 1400 le16_to_cpu(es->s_reserved_gdt_blocks)) : 0;
1401 group_data[i].free_blocks_count = blocks_per_group - overhead; 1401 group_data[i].free_blocks_count = blocks_per_group - overhead;
1402 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, 1402 if (ext4_has_group_desc_csum(sb))
1403 EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
1404 flex_gd->bg_flags[i] = EXT4_BG_BLOCK_UNINIT | 1403 flex_gd->bg_flags[i] = EXT4_BG_BLOCK_UNINIT |
1405 EXT4_BG_INODE_UNINIT; 1404 EXT4_BG_INODE_UNINIT;
1406 else 1405 else
1407 flex_gd->bg_flags[i] = EXT4_BG_INODE_ZEROED; 1406 flex_gd->bg_flags[i] = EXT4_BG_INODE_ZEROED;
1408 } 1407 }
1409 1408
1410 if (last_group == n_group && 1409 if (last_group == n_group && ext4_has_group_desc_csum(sb))
1411 EXT4_HAS_RO_COMPAT_FEATURE(sb,
1412 EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
1413 /* We need to initialize block bitmap of last group. */ 1410 /* We need to initialize block bitmap of last group. */
1414 flex_gd->bg_flags[i - 1] &= ~EXT4_BG_BLOCK_UNINIT; 1411 flex_gd->bg_flags[i - 1] &= ~EXT4_BG_BLOCK_UNINIT;
1415 1412