[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:
Panagiotis Issaris 2006-09-27 01:49:37 -07:00 • committed by Linus Torvalds
commit f8314dc60c
35 changed files with 43 additions and 84 deletions

View file

@ -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);

View file

@ -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;