[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Jffs2-bit-acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
32c2d2bc4b
commit
f8314dc60c
@@ -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);
|
||||
|
Reference in New Issue
Block a user