aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ext2fs/alloc_tables.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-07-07 13:50:49 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-07-07 14:20:42 -0400
commitc4d2d43e2dc831d5c209af3e42dffd7b5e65c1f6 (patch)
tree848cd3ee00e178628dc0dbdea4372d50bbfdb905 /lib/ext2fs/alloc_tables.c
parentd32c915abfb224f6f6659e9cada7e9f759b7e3d2 (diff)
downloadandroid_external_e2fsprogs-c4d2d43e2dc831d5c209af3e42dffd7b5e65c1f6.tar.gz
android_external_e2fsprogs-c4d2d43e2dc831d5c209af3e42dffd7b5e65c1f6.tar.bz2
android_external_e2fsprogs-c4d2d43e2dc831d5c209af3e42dffd7b5e65c1f6.zip
libext2fs: replace missing flexbg initialization in flexbg_offset
Commit 25567a7b0fa9 accidentally removed the initialization for flexbg and flexbg_size, which affected ext2fs_allocate_group_table() and ext2fs_allocate_tables(). Replace them. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/alloc_tables.c')
-rw-r--r--lib/ext2fs/alloc_tables.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c
index 8b1d2949..885d2b23 100644
--- a/lib/ext2fs/alloc_tables.c
+++ b/lib/ext2fs/alloc_tables.c
@@ -42,6 +42,8 @@ static blk64_t flexbg_offset(ext2_filsys fs, dgrp_t group, blk64_t start_blk,
blk64_t last_blk, first_free = 0;
dgrp_t last_grp;
+ flexbg_size = 1 << fs->super->s_log_groups_per_flex;
+ flexbg = group / flexbg_size;
size = rem_grp * elem_size;
if (size > (int) (fs->super->s_blocks_per_group / 8))