]> err.no Git - linux-2.6/blobdiff - fs/ext4/resize.c
ext4: fix online resize bug
[linux-2.6] / fs / ext4 / resize.c
index 9f086a6a472b1c13359334d6966caaa6a90d4ea1..9ecb92f68543ab12f5531a7cf4cb2c6233d2258e 100644 (file)
@@ -563,7 +563,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
        }
 
        blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count;
-       data = (__le32 *)dind->b_data + EXT4_SB(sb)->s_gdb_count;
+       data = (__le32 *)dind->b_data + (EXT4_SB(sb)->s_gdb_count %
+                                        EXT4_ADDR_PER_BLOCK(sb));
        end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb);
 
        /* Get each reserved primary GDT block and verify it holds backups */