aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-09-27 04:49:37 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:10 -0400
commitf8314dc60ccba7e41f425048c4160dc7f63377d5 (patch)
tree4e361a6e93dc7f64da0244e5a0dfef1fface0ddb /fs/hfsplus
parent32c2d2bc4bed61323f14f2a7d69ccbd567253d8a (diff)
[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Jffs2-bit-acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/bnode.c3
-rw-r--r--fs/hfsplus/btree.c3
2 files changed, 2 insertions, 4 deletions
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)
409 sb = tree->inode->i_sb; 409 sb = tree->inode->i_sb;
410 size = sizeof(struct hfs_bnode) + tree->pages_per_bnode * 410 size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
411 sizeof(struct page *); 411 sizeof(struct page *);
412 node = kmalloc(size, GFP_KERNEL); 412 node = kzalloc(size, GFP_KERNEL);
413 if (!node) 413 if (!node)
414 return NULL; 414 return NULL;
415 memset(node, 0, size);
416 node->tree = tree; 415 node->tree = tree;
417 node->this = cnid; 416 node->this = cnid;
418 set_bit(HFS_BNODE_NEW, &node->flags); 417 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)
24 struct page *page; 24 struct page *page;
25 unsigned int size; 25 unsigned int size;
26 26
27 tree = kmalloc(sizeof(*tree), GFP_KERNEL); 27 tree = kzalloc(sizeof(*tree), GFP_KERNEL);
28 if (!tree) 28 if (!tree)
29 return NULL; 29 return NULL;
30 memset(tree, 0, sizeof(*tree));
31 30
32 init_MUTEX(&tree->tree_lock); 31 init_MUTEX(&tree->tree_lock);
33 spin_lock_init(&tree->hash_lock); 32 spin_lock_init(&tree->hash_lock);