diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-10-11 19:38:39 +0900 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-10-28 01:30:04 +0200 |
commit | 81a4e320e6ee29bde3fe880ab87b2122bc1de88b (patch) | |
tree | 6df598345f477cd931bb9f4c8333415a0175ecaf /fs/ext3 | |
parent | 4569cd1b0d91e4d7fa67f950201befc2acfecb34 (diff) | |
download | op-kernel-dev-81a4e320e6ee29bde3fe880ab87b2122bc1de88b.zip op-kernel-dev-81a4e320e6ee29bde3fe880ab87b2122bc1de88b.tar.gz |
ext3: Use DIV_ROUND_UP() on group desc block counting
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 1811c6f..1c68751 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -1864,8 +1864,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) - le32_to_cpu(es->s_first_data_block) - 1) / EXT3_BLOCKS_PER_GROUP(sb)) + 1; - db_count = (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) / - EXT3_DESC_PER_BLOCK(sb); + db_count = DIV_ROUND_UP(sbi->s_groups_count, EXT3_DESC_PER_BLOCK(sb)); sbi->s_group_desc = kmalloc(db_count * sizeof (struct buffer_head *), GFP_KERNEL); if (sbi->s_group_desc == NULL) { |