author: Yoann Padioleau <padator@wanadoo.fr> 2007-07-19 01:49:03 -0700
committer: Linus Torvalds <torvalds@woody.linux-foundation.org> 2007-07-19 10:04:50 -0700
commit: dd00cc486ab1c17049a535413d1751ef3482141c
parent: 3b5ad0797c0e4049001f961a8b58f1d0ce532072
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 3 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 3eefa97fe204..a6b1072daea7 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);