From: Theodore Ts'o Date: Thu, 7 Jul 2011 17:50:49 +0000 (-0400) Subject: libext2fs: replace missing flexbg initialization in flexbg_offset X-Git-Tag: v1.42-WIP-0916~46 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c4d2d43e2dc831d5c209af3e42dffd7b5e65c1f6;p=tools%2Fe2fsprogs.git 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" --- diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c index 8b1d294..885d2b2 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))