mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -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
|
|
@ -655,11 +655,10 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
|||
int i, j;
|
||||
__le32 features;
|
||||
|
||||
sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
|
||||
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
|
||||
if (!sbi)
|
||||
return -ENOMEM;
|
||||
sb->s_fs_info = sbi;
|
||||
memset(sbi, 0, sizeof(*sbi));
|
||||
|
||||
/*
|
||||
* See what the current blocksize for the device is, and
|
||||
|
|
|
|||
|
|
@ -521,11 +521,10 @@ bad_block: ext2_error(sb, "ext2_xattr_set",
|
|||
}
|
||||
} else {
|
||||
/* Allocate a buffer where we construct the new block. */
|
||||
header = kmalloc(sb->s_blocksize, GFP_KERNEL);
|
||||
header = kzalloc(sb->s_blocksize, GFP_KERNEL);
|
||||
error = -ENOMEM;
|
||||
if (header == NULL)
|
||||
goto cleanup;
|
||||
memset(header, 0, sb->s_blocksize);
|
||||
end = (char *)header + sb->s_blocksize;
|
||||
header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
|
||||
header->h_blocks = header->h_refcount = cpu_to_le32(1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue