mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -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
|
|
@ -311,11 +311,10 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
|
|||
unsigned i, imap_len;
|
||||
struct bfs_sb_info * info;
|
||||
|
||||
info = kmalloc(sizeof(*info), GFP_KERNEL);
|
||||
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
return -ENOMEM;
|
||||
s->s_fs_info = info;
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
||||
sb_set_blocksize(s, BFS_BSIZE);
|
||||
|
||||
|
|
@ -338,10 +337,9 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
|
|||
+ BFS_ROOT_INO - 1;
|
||||
|
||||
imap_len = info->si_lasti/8 + 1;
|
||||
info->si_imap = kmalloc(imap_len, GFP_KERNEL);
|
||||
info->si_imap = kzalloc(imap_len, GFP_KERNEL);
|
||||
if (!info->si_imap)
|
||||
goto out;
|
||||
memset(info->si_imap, 0, imap_len);
|
||||
for (i=0; i<BFS_ROOT_INO; i++)
|
||||
set_bit(i, info->si_imap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue