aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/resize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 591f4bda1146..a0ee26c23dd8 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -456,6 +456,9 @@ static int setup_new_flex_group_blocks(struct super_block *sb,
456 gdblocks = ext4_bg_num_gdb(sb, group); 456 gdblocks = ext4_bg_num_gdb(sb, group);
457 start = ext4_group_first_block_no(sb, group); 457 start = ext4_group_first_block_no(sb, group);
458 458
459 if (!ext4_bg_has_super(sb, group))
460 goto handle_itb;
461
459 /* Copy all of the GDT blocks into the backup in this group */ 462 /* Copy all of the GDT blocks into the backup in this group */
460 for (j = 0, block = start + 1; j < gdblocks; j++, block++) { 463 for (j = 0, block = start + 1; j < gdblocks; j++, block++) {
461 struct buffer_head *gdb; 464 struct buffer_head *gdb;
@@ -498,6 +501,7 @@ static int setup_new_flex_group_blocks(struct super_block *sb,
498 goto out; 501 goto out;
499 } 502 }
500 503
504handle_itb:
501 /* Initialize group tables of the grop @group */ 505 /* Initialize group tables of the grop @group */
502 if (!(bg_flags[i] & EXT4_BG_INODE_ZEROED)) 506 if (!(bg_flags[i] & EXT4_BG_INODE_ZEROED))
503 goto handle_bb; 507 goto handle_bb;