linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / ipv4 / ipvs / ip_vs_app.c
index d9212ad..9b176a9 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/in.h>
 #include <linux/ip.h>
 #include <net/protocol.h>
+#include <net/tcp.h>
 #include <asm/system.h>
 #include <linux/stat.h>
 #include <linux/proc_fs.h>
@@ -109,8 +110,7 @@ ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
        return 0;
 
   out:
-       if (inc->timeout_table)
-               kfree(inc->timeout_table);
+       kfree(inc->timeout_table);
        kfree(inc);
        return ret;
 }
@@ -135,8 +135,7 @@ ip_vs_app_inc_release(struct ip_vs_app *inc)
 
        list_del(&inc->a_list);
 
-       if (inc->timeout_table != NULL)
-               kfree(inc->timeout_table);
+       kfree(inc->timeout_table);
        kfree(inc);
 }
 
@@ -225,34 +224,6 @@ void unregister_ip_vs_app(struct ip_vs_app *app)
 }
 
 
-#if 0000
-/*
- *     Get reference to app by name (called from user context)
- */
-struct ip_vs_app *ip_vs_app_get_by_name(char *appname)
-{
-       struct ip_vs_app *app, *a = NULL;
-
-       down(&__ip_vs_app_mutex);
-
-       list_for_each_entry(ent, &ip_vs_app_list, a_list) {
-               if (strcmp(app->name, appname))
-                       continue;
-
-               /* softirq may call ip_vs_app_get too, so the caller
-                  must disable softirq on the current CPU */
-               if (ip_vs_app_get(app))
-                       a = app;
-               break;
-       }
-
-       up(&__ip_vs_app_mutex);
-
-       return a;
-}
-#endif
-
-
 /*
  *     Bind ip_vs_conn to its ip_vs_app (called by cp constructor)
  */
@@ -603,7 +574,7 @@ static struct file_operations ip_vs_app_fops = {
 /*
  *     Replace a segment of data with a new segment
  */
-int ip_vs_skb_replace(struct sk_buff *skb, int pri,
+int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri,
                      char *o_buf, int o_len, char *n_buf, int n_len)
 {
        struct iphdr *iph;