diff options
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r-- | fs/ext4/resize.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 9f086a6a472b..9ff7b1c04239 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -563,7 +563,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, | |||
563 | } | 563 | } |
564 | 564 | ||
565 | blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; | 565 | blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; |
566 | data = (__le32 *)dind->b_data + EXT4_SB(sb)->s_gdb_count; | 566 | data = (__le32 *)dind->b_data + (EXT4_SB(sb)->s_gdb_count % |
567 | EXT4_ADDR_PER_BLOCK(sb)); | ||
567 | end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb); | 568 | end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb); |
568 | 569 | ||
569 | /* Get each reserved primary GDT block and verify it holds backups */ | 570 | /* Get each reserved primary GDT block and verify it holds backups */ |
@@ -854,7 +855,8 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) | |||
854 | */ | 855 | */ |
855 | 856 | ||
856 | /* Update group descriptor block for new group */ | 857 | /* Update group descriptor block for new group */ |
857 | gdp = (struct ext4_group_desc *)primary->b_data + gdb_off; | 858 | gdp = (struct ext4_group_desc *)((char *)primary->b_data + |
859 | gdb_off * EXT4_DESC_SIZE(sb)); | ||
858 | 860 | ||
859 | ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ | 861 | ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ |
860 | ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ | 862 | ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ |