staging: lustre: osc: Replace kmem_cache_alloc with kmem_cache_zalloc
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Fri, 26 Feb 2016 08:54:55 +0000 (14:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2016 03:18:42 +0000 (19:18 -0800)
commitc4418daca7a27474eda4a926f0645054516c7d7f
treecb062c45ada780fc4b00d52fe3167597da71b660
parent1c147c83f3d663751d849cb97b5aba409f5867cb
staging: lustre: osc: Replace kmem_cache_alloc with kmem_cache_zalloc

Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory
to zero.

The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@@
expression e,f;
@@
- kmem_cache_alloc(e, f |__GFP_ZERO)
+ kmem_cache_zalloc(e, f)
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_cache.c
drivers/staging/lustre/lustre/osc/osc_dev.c
drivers/staging/lustre/lustre/osc/osc_io.c
drivers/staging/lustre/lustre/osc/osc_lock.c
drivers/staging/lustre/lustre/osc/osc_object.c
drivers/staging/lustre/lustre/osc/osc_quota.c
drivers/staging/lustre/lustre/osc/osc_request.c