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/hfsplus/bnode.c | 3 +-- fs/hfsplus/btree.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'fs/hfsplus') diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 77bf434da679..29da6574ba77 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -409,10 +409,9 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) sb = tree->inode->i_sb; size = sizeof(struct hfs_bnode) + tree->pages_per_bnode * sizeof(struct page *); - node = kmalloc(size, GFP_KERNEL); + node = kzalloc(size, GFP_KERNEL); if (!node) return NULL; - memset(node, 0, size); node->tree = tree; node->this = cnid; set_bit(HFS_BNODE_NEW, &node->flags); diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index cfc852fdd1b5..a9b9e872e29a 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -24,10 +24,9 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) struct page *page; unsigned int size; - tree = kmalloc(sizeof(*tree), GFP_KERNEL); + tree = kzalloc(sizeof(*tree), GFP_KERNEL); if (!tree) return NULL; - memset(tree, 0, sizeof(*tree)); init_MUTEX(&tree->tree_lock); spin_lock_init(&tree->hash_lock); -- cgit v1.2.3-59-g8ed1b