aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipvs
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-10 04:45:03 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:27 -0500
commitc376222960ae91d5ffb9197ee36771aaed1d9f90 (patch)
tree7f431c42529fec77433d33490bd9f2a8c47ba091 /net/ipv4/ipvs
parent1b135431abf5ea92e61bf4e91d93726c7b96da5f (diff)
[PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc().
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the corresponding "kmem_cache_zalloc()" call. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@muc.de> Cc: Roland McGrath <roland@redhat.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Acked-by: Joel Becker <Joel.Becker@oracle.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Jan Kara <jack@ucw.cz> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/ipvs')
-rw-r--r--net/ipv4/ipvs/ip_vs_conn.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index 8086787a2c51..3aec4ac66e3c 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -603,13 +603,12 @@ ip_vs_conn_new(int proto, __be32 caddr, __be16 cport, __be32 vaddr, __be16 vport
603 struct ip_vs_conn *cp; 603 struct ip_vs_conn *cp;
604 struct ip_vs_protocol *pp = ip_vs_proto_get(proto); 604 struct ip_vs_protocol *pp = ip_vs_proto_get(proto);
605 605
606 cp = kmem_cache_alloc(ip_vs_conn_cachep, GFP_ATOMIC); 606 cp = kmem_cache_zalloc(ip_vs_conn_cachep, GFP_ATOMIC);
607 if (cp == NULL) { 607 if (cp == NULL) {
608 IP_VS_ERR_RL("ip_vs_conn_new: no memory available.\n"); 608 IP_VS_ERR_RL("ip_vs_conn_new: no memory available.\n");
609 return NULL; 609 return NULL;
610 } 610 }
611 611
612 memset(cp, 0, sizeof(*cp));
613 INIT_LIST_HEAD(&cp->c_list); 612 INIT_LIST_HEAD(&cp->c_list);
614 init_timer(&cp->timer); 613 init_timer(&cp->timer);
615 cp->timer.data = (unsigned long)cp; 614 cp->timer.data = (unsigned long)cp;