mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -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
|
|
@ -281,11 +281,10 @@ int afs_vlocation_lookup(struct afs_cell *cell,
|
|||
spin_unlock(&cell->vl_gylock);
|
||||
|
||||
/* not in the cell's in-memory lists - create a new record */
|
||||
vlocation = kmalloc(sizeof(struct afs_vlocation), GFP_KERNEL);
|
||||
vlocation = kzalloc(sizeof(struct afs_vlocation), GFP_KERNEL);
|
||||
if (!vlocation)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(vlocation, 0, sizeof(struct afs_vlocation));
|
||||
atomic_set(&vlocation->usage, 1);
|
||||
INIT_LIST_HEAD(&vlocation->link);
|
||||
rwlock_init(&vlocation->lock);
|
||||
|
|
|
|||
|
|
@ -186,11 +186,10 @@ int afs_volume_lookup(const char *name, struct afs_cell *cell, int rwpath,
|
|||
_debug("creating new volume record");
|
||||
|
||||
ret = -ENOMEM;
|
||||
volume = kmalloc(sizeof(struct afs_volume), GFP_KERNEL);
|
||||
volume = kzalloc(sizeof(struct afs_volume), GFP_KERNEL);
|
||||
if (!volume)
|
||||
goto error_up;
|
||||
|
||||
memset(volume, 0, sizeof(struct afs_volume));
|
||||
atomic_set(&volume->usage, 1);
|
||||
volume->type = type;
|
||||
volume->type_force = force;
|
||||
|
|
|
|||
Loading…
Reference in a new issue