Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262128
b: refs/heads/master
c: 668f4dc
h: refs/heads/master
v: v3
  • Loading branch information
Yongqiang Yang authored and Theodore Ts'o committed Jul 28, 2011
1 parent f207a62 commit 210ee52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f919710143cb2025157c3c193ee22de86f3ed73
refs/heads/master: 668f4dc5593327fadc95b33189c375f7178ef88e
12 changes: 7 additions & 5 deletions trunk/fs/ext4/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
* backup GDT blocks are stored in their reserved primary GDT block.
*/
static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
struct ext4_new_group_data *input)
ext4_group_t group)
{
struct super_block *sb = inode->i_sb;
int reserved_gdb =le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks);
Expand Down Expand Up @@ -617,7 +617,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
* Finally we can add each of the reserved backup GDT blocks from
* the new group to its reserved primary GDT block.
*/
blk = input->group * EXT4_BLOCKS_PER_GROUP(sb);
blk = group * EXT4_BLOCKS_PER_GROUP(sb);
for (i = 0; i < reserved_gdb; i++) {
int err2;
data = (__le32 *)primary[i]->b_data;
Expand Down Expand Up @@ -831,9 +831,11 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
if ((err = ext4_journal_get_write_access(handle, primary)))
goto exit_journal;

if (reserved_gdb && ext4_bg_num_gdb(sb, input->group) &&
(err = reserve_backup_gdb(handle, inode, input)))
goto exit_journal;
if (reserved_gdb && ext4_bg_num_gdb(sb, input->group)) {
err = reserve_backup_gdb(handle, inode, input->group);
if (err)
goto exit_journal;
}
} else {
/*
* Note that we can access new group descriptor block safely
Expand Down

0 comments on commit 210ee52

Please sign in to comment.