Commit 05a178ec authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

rds: use kmem_cache_zalloc instead of kmem_cache_alloc/memset

Use kmem_cache_zalloc instead of kmem_cache_alloc/memset.
Signed-off-by: default avatarWei Yongjun <>
Signed-off-by: default avatarAndy Grover <>
Signed-off-by: default avatarDavid S. Miller <>
parent 9c56a844
......@@ -148,14 +148,12 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr,
if (conn)
goto out;
conn = kmem_cache_alloc(rds_conn_slab, gfp);
conn = kmem_cache_zalloc(rds_conn_slab, gfp);
if (conn == NULL) {
conn = ERR_PTR(-ENOMEM);
goto out;
memset(conn, 0, sizeof(*conn));
conn->c_version = RDS_PROTOCOL_3_0;
conn->c_laddr = laddr;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment