summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext4_utils/make_ext4fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index c9fd9925..22c94244 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -214,7 +214,8 @@ static u32 compute_inodes_per_group()
{
u32 blocks = DIV_ROUND_UP(info.len, info.block_size);
u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group);
- return DIV_ROUND_UP(info.inodes, block_groups);
+ u32 inodes = DIV_ROUND_UP(info.inodes, block_groups);
+ return ALIGN(inodes, (info.block_size / info.inode_size));
}
static u32 compute_bg_desc_reserve_blocks()