befs: replace kmalloc/memset 0 by kzalloc
Use kzalloc for clean fs_info allocation like other filesystems. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
84ee353df0
commit
2d4319ef57
@@ -791,7 +791,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
|
|||||||
|
|
||||||
save_mount_options(sb, data);
|
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) {
|
if (sb->s_fs_info == NULL) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"BeFS(%s): Unable to allocate memory for private "
|
"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;
|
goto unacquire_none;
|
||||||
}
|
}
|
||||||
befs_sb = BEFS_SB(sb);
|
befs_sb = BEFS_SB(sb);
|
||||||
memset(befs_sb, 0, sizeof(befs_sb_info));
|
|
||||||
|
|
||||||
if (!parse_options((char *) data, &befs_sb->mount_opts)) {
|
if (!parse_options((char *) data, &befs_sb->mount_opts)) {
|
||||||
befs_error(sb, "cannot parse mount options");
|
befs_error(sb, "cannot parse mount options");
|
||||||
|
Reference in New Issue
Block a user