befs: replace kmalloc/memset 0 by kzalloc
authorFabian Frederick <fabf@skynet.be>
Thu, 3 Apr 2014 21:50:21 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:24 +0000 (16:21 -0700)
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>
fs/befs/linuxvfs.c

index 845d2d690ce2dc2becddef70041a3e6b69440d62..a1a09462fe47b248e5a21e531aa5a17a8de542a3 100644 (file)
@@ -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");