mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris <[email protected]> Jffs2-bit-acked-by: David Woodhouse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
32c2d2bc4b
commit
f8314dc60c
35 changed files with 43 additions and 84 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue