diff options
-rw-r--r-- | fs/ext4/resize.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index eb0aebcca55..12eace09654 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -656,10 +656,10 @@ static unsigned ext4_list_backups(struct super_block *sb, unsigned *three, | |||
656 | * groups in current filesystem that have BACKUPS, or -ve error code. | 656 | * groups in current filesystem that have BACKUPS, or -ve error code. |
657 | */ | 657 | */ |
658 | static int verify_reserved_gdb(struct super_block *sb, | 658 | static int verify_reserved_gdb(struct super_block *sb, |
659 | ext4_group_t end, | ||
659 | struct buffer_head *primary) | 660 | struct buffer_head *primary) |
660 | { | 661 | { |
661 | const ext4_fsblk_t blk = primary->b_blocknr; | 662 | const ext4_fsblk_t blk = primary->b_blocknr; |
662 | const ext4_group_t end = EXT4_SB(sb)->s_groups_count; | ||
663 | unsigned three = 1; | 663 | unsigned three = 1; |
664 | unsigned five = 5; | 664 | unsigned five = 5; |
665 | unsigned seven = 7; | 665 | unsigned seven = 7; |
@@ -734,7 +734,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
734 | if (!gdb_bh) | 734 | if (!gdb_bh) |
735 | return -EIO; | 735 | return -EIO; |
736 | 736 | ||
737 | gdbackups = verify_reserved_gdb(sb, gdb_bh); | 737 | gdbackups = verify_reserved_gdb(sb, group, gdb_bh); |
738 | if (gdbackups < 0) { | 738 | if (gdbackups < 0) { |
739 | err = gdbackups; | 739 | err = gdbackups; |
740 | goto exit_bh; | 740 | goto exit_bh; |
@@ -897,7 +897,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, | |||
897 | err = -EIO; | 897 | err = -EIO; |
898 | goto exit_bh; | 898 | goto exit_bh; |
899 | } | 899 | } |
900 | if ((gdbackups = verify_reserved_gdb(sb, primary[res])) < 0) { | 900 | gdbackups = verify_reserved_gdb(sb, group, primary[res]); |
901 | if (gdbackups < 0) { | ||
901 | brelse(primary[res]); | 902 | brelse(primary[res]); |
902 | err = gdbackups; | 903 | err = gdbackups; |
903 | goto exit_bh; | 904 | goto exit_bh; |