提交 2d4319ef 编写于 作者: F Fabian Frederick 提交者: Linus Torvalds

befs: replace kmalloc/memset 0 by kzalloc

Use kzalloc for clean fs_info allocation like other filesystems.
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 84ee353d
......@@ -791,7 +791,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
save_mount_options(sb, data);
sb->s_fs_info = kmalloc(sizeof (*befs_sb), GFP_KERNEL);
sb->s_fs_info = kzalloc(sizeof(*befs_sb), GFP_KERNEL);
if (sb->s_fs_info == NULL) {
printk(KERN_ERR
"BeFS(%s): Unable to allocate memory for private "
......@@ -799,7 +799,6 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
goto unacquire_none;
}
befs_sb = BEFS_SB(sb);
memset(befs_sb, 0, sizeof(befs_sb_info));
if (!parse_options((char *) data, &befs_sb->mount_opts)) {
befs_error(sb, "cannot parse mount options");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册