[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a0ee7c70b2
commit
0da974f4f3
@@ -114,13 +114,8 @@ void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) {
|
||||
*/
|
||||
struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt)
|
||||
{
|
||||
unsigned int ops = clnt->cl_maxproc;
|
||||
size_t size = ops * sizeof(struct rpc_iostats);
|
||||
struct rpc_iostats *new;
|
||||
|
||||
new = kmalloc(size, GFP_KERNEL);
|
||||
if (new)
|
||||
memset(new, 0 , size);
|
||||
new = kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL);
|
||||
return new;
|
||||
}
|
||||
EXPORT_SYMBOL(rpc_alloc_iostats);
|
||||
|
Reference in New Issue
Block a user