Skip to content

Commit 62a8efe

Browse files
committed
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: Ext4: Fix online resize block group descriptor corruption
2 parents bec95aa + 2856922 commit 62a8efe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ext4/resize.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,8 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
855855
*/
856856

857857
/* Update group descriptor block for new group */
858-
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));
859860

860861
ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */
861862
ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */

0 commit comments

Comments
 (0)