]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/ipvs/ip_vs_proto.c
[IPVS]: Relax the module get/put in ip_vs_app.c
[linux-2.6-omap-h63xx.git] / net / ipv4 / ipvs / ip_vs_proto.c
index c4528b5c800d04a257f2d806ed6414378b98ea31..c0e11ec8f0f991d7096ce0e44f1535eddd7e39b2 100644 (file)
@@ -45,7 +45,7 @@ static struct ip_vs_protocol *ip_vs_proto_table[IP_VS_PROTO_TAB_SIZE];
 /*
  *     register an ipvs protocol
  */
-static int register_ip_vs_protocol(struct ip_vs_protocol *pp)
+static int __used register_ip_vs_protocol(struct ip_vs_protocol *pp)
 {
        unsigned hash = IP_VS_PROTO_HASH(pp->protocol);
 
@@ -118,13 +118,7 @@ void ip_vs_protocol_timeout_change(int flags)
 int *
 ip_vs_create_timeout_table(int *table, int size)
 {
-       int *t;
-
-       t = kmalloc(size, GFP_ATOMIC);
-       if (t == NULL)
-               return NULL;
-       memcpy(t, table, size);
-       return t;
+       return kmemdup(table, size, GFP_ATOMIC);
 }