summaryrefslogtreecommitdiffstats
path: root/net/rds/connection.c
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-04-09 16:09:44 +0200
committerDavid S. Miller <davem@davemloft.net>2009-04-10 02:21:21 +0200
commit05a178ecdc7396b78dfbb5d8bda65108b37b8672 (patch)
treef500fe4a1d732a933d72824752deb681667bfd8b /net/rds/connection.c
parentRDS: remove unused #include <version.h> (diff)
downloadlinux-05a178ecdc7396b78dfbb5d8bda65108b37b8672.tar.xz
linux-05a178ecdc7396b78dfbb5d8bda65108b37b8672.zip
rds: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
Use kmem_cache_zalloc instead of kmem_cache_alloc/memset. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r--net/rds/connection.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 273f064930a8..d14445c48304 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -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));
-
INIT_HLIST_NODE(&conn->c_hash_node);
conn->c_version = RDS_PROTOCOL_3_0;
conn->c_laddr = laddr;