From f8314dc60ccba7e41f425048c4160dc7f63377d5 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 27 Sep 2006 01:49:37 -0700 Subject: [PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris Jffs2-bit-acked-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/minix/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'fs/minix') diff --git a/fs/minix/inode.c b/fs/minix/inode.c index 330ff9fc7cf0..e24be7fc0651 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -145,11 +145,10 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) struct inode *root_inode; struct minix_sb_info *sbi; - sbi = kmalloc(sizeof(struct minix_sb_info), GFP_KERNEL); + sbi = kzalloc(sizeof(struct minix_sb_info), GFP_KERNEL); if (!sbi) return -ENOMEM; s->s_fs_info = sbi; - memset(sbi, 0, sizeof(struct minix_sb_info)); /* N.B. These should be compile-time tests. Unfortunately that is impossible. */ @@ -207,10 +206,9 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) if (sbi->s_imap_blocks == 0 || sbi->s_zmap_blocks == 0) goto out_illegal_sb; i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) * sizeof(bh); - map = kmalloc(i, GFP_KERNEL); + map = kzalloc(i, GFP_KERNEL); if (!map) goto out_no_map; - memset(map, 0, i); sbi->s_imap = &map[0]; sbi->s_zmap = &map[sbi->s_imap_blocks]; -- cgit v1.2.3-58-ga151