aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorYongqiang Yang <xiaoqiangnk@gmail.com>2011-07-27 21:23:13 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-07-27 21:23:13 -0400
commit668f4dc5593327fadc95b33189c375f7178ef88e (patch)
treeb368734ce8ef044762887dcd740e2609c6eac893 /fs/ext4
parent2f919710143cb2025157c3c193ee22de86f3ed73 (diff)
ext4: simplify parameters of reserve_backup_gdb()
The reserve_backup_gdb() function only needs the block group number; there's no need to pass a pointer to struct ext4_new_group_data to it. Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/resize.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 9e453552f10e..6e3327d6ff1f 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -546,7 +546,7 @@ exit_bh:
546 * backup GDT blocks are stored in their reserved primary GDT block. 546 * backup GDT blocks are stored in their reserved primary GDT block.
547 */ 547 */
548static int reserve_backup_gdb(handle_t *handle, struct inode *inode, 548static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
549 struct ext4_new_group_data *input) 549 ext4_group_t group)
550{ 550{
551 struct super_block *sb = inode->i_sb; 551 struct super_block *sb = inode->i_sb;
552 int reserved_gdb =le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks); 552 int reserved_gdb =le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks);
@@ -617,7 +617,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
617 * Finally we can add each of the reserved backup GDT blocks from 617 * Finally we can add each of the reserved backup GDT blocks from
618 * the new group to its reserved primary GDT block. 618 * the new group to its reserved primary GDT block.
619 */ 619 */
620 blk = input->group * EXT4_BLOCKS_PER_GROUP(sb); 620 blk = group * EXT4_BLOCKS_PER_GROUP(sb);
621 for (i = 0; i < reserved_gdb; i++) { 621 for (i = 0; i < reserved_gdb; i++) {
622 int err2; 622 int err2;
623 data = (__le32 *)primary[i]->b_data; 623 data = (__le32 *)primary[i]->b_data;
@@ -831,9 +831,11 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
831 if ((err = ext4_journal_get_write_access(handle, primary))) 831 if ((err = ext4_journal_get_write_access(handle, primary)))
832 goto exit_journal; 832 goto exit_journal;
833 833
834 if (reserved_gdb && ext4_bg_num_gdb(sb, input->group) && 834 if (reserved_gdb && ext4_bg_num_gdb(sb, input->group)) {
835 (err = reserve_backup_gdb(handle, inode, input))) 835 err = reserve_backup_gdb(handle, inode, input->group);
836 goto exit_journal; 836 if (err)
837 goto exit_journal;
838 }
837 } else { 839 } else {
838 /* 840 /*
839 * Note that we can access new group descriptor block safely 841 * Note that we can access new group descriptor block safely