summaryrefslogtreecommitdiffstats
path: root/fs/ext2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r--fs/ext2/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 3eefa97..a6b1072 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -883,13 +883,11 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
goto failed_mount;
}
bgl_lock_init(&sbi->s_blockgroup_lock);
- sbi->s_debts = kmalloc(sbi->s_groups_count * sizeof(*sbi->s_debts),
- GFP_KERNEL);
+ sbi->s_debts = kcalloc(sbi->s_groups_count, sizeof(*sbi->s_debts), GFP_KERNEL);
if (!sbi->s_debts) {
printk ("EXT2-fs: not enough memory\n");
goto failed_mount_group_desc;
}
- memset(sbi->s_debts, 0, sbi->s_groups_count * sizeof(*sbi->s_debts));
for (i = 0; i < db_count; i++) {
block = descriptor_loc(sb, logic_sb_block, i);
sbi->s_group_desc[i] = sb_bread(sb, block);
OpenPOWER on IntegriCloud