aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ext2fs/closefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs/closefs.c')
-rw-r--r--lib/ext2fs/closefs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index 659ee27f..86ef29af 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -100,8 +100,9 @@ int ext2fs_super_and_bgd_loc(ext2_filsys fs,
numblocks--;
}
}
-
- numblocks -= 2 + fs->inode_blocks_per_group;
+
+ if (!fs->super->s_log_groups_per_flex)
+ numblocks -= 2 + fs->inode_blocks_per_group;
if (ret_super_blk)
*ret_super_blk = super_blk;