diff options
author | Yongqiang Yang <xiaoqiangnk@gmail.com> | 2012-01-03 23:43:39 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-01-03 23:43:39 -0500 |
commit | c72df9f928efd5b17e84bdb7b8ec1be3b9c1ea9d (patch) | |
tree | c699e4b60045a4e2228fe86536e752f789b9136a /fs/ext4/resize.c | |
parent | 2e10e2f2e5a800a54ad2f16dfdd8c034e005958b (diff) | |
download | linux-3.10-c72df9f928efd5b17e84bdb7b8ec1be3b9c1ea9d.tar.gz linux-3.10-c72df9f928efd5b17e84bdb7b8ec1be3b9c1ea9d.tar.bz2 linux-3.10-c72df9f928efd5b17e84bdb7b8ec1be3b9c1ea9d.zip |
ext4: pass verify_reserved_gdb() the number of group decriptors
The 64bit resizer adds a flex group each time, so verify_reserved_gdb
can not use s_groups_count directly, it should use the number of group
decriptors before the added group.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/resize.c')
-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, * groups in current filesystem that have BACKUPS, or -ve error code. */ static int verify_reserved_gdb(struct super_block *sb, + ext4_group_t end, struct buffer_head *primary) { const ext4_fsblk_t blk = primary->b_blocknr; - const ext4_group_t end = EXT4_SB(sb)->s_groups_count; unsigned three = 1; unsigned five = 5; unsigned seven = 7; @@ -734,7 +734,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, if (!gdb_bh) return -EIO; - gdbackups = verify_reserved_gdb(sb, gdb_bh); + gdbackups = verify_reserved_gdb(sb, group, gdb_bh); if (gdbackups < 0) { err = gdbackups; goto exit_bh; @@ -897,7 +897,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, err = -EIO; goto exit_bh; } - if ((gdbackups = verify_reserved_gdb(sb, primary[res])) < 0) { + gdbackups = verify_reserved_gdb(sb, group, primary[res]); + if (gdbackups < 0) { brelse(primary[res]); err = gdbackups; goto exit_bh; |