IPVS: remove unused init and cleanup functions.
authorHans Schillstrom <hans.schillstrom@ericsson.com>
Mon, 13 Jun 2011 10:19:27 +0000 (12:19 +0200)
committerSimon Horman <horms@verge.net.au>
Tue, 14 Jun 2011 00:07:32 +0000 (09:07 +0900)
After restructuring, there is some unused or empty functions
left to be removed.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_app.c
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_est.c
net/netfilter/ipvs/ip_vs_sync.c

index 1b0985fca1e2a92c57af94c193cd86c72fbe2d3a..b1370c4015b62bb9c2cc72c9b3a616f61d1da2a9 100644 (file)
@@ -1117,8 +1117,6 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc);
 
 extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb);
 extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb);
-extern int ip_vs_app_init(void);
-extern void ip_vs_app_cleanup(void);
 
 void ip_vs_bind_pe(struct ip_vs_service *svc, struct ip_vs_pe *pe);
 void ip_vs_unbind_pe(struct ip_vs_service *svc);
@@ -1221,15 +1219,11 @@ extern int start_sync_thread(struct net *net, int state, char *mcast_ifn,
                             __u8 syncid);
 extern int stop_sync_thread(struct net *net, int state);
 extern void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp);
-extern int ip_vs_sync_init(void);
-extern void ip_vs_sync_cleanup(void);
 
 
 /*
  *      IPVS rate estimator prototypes (from ip_vs_est.c)
  */
-extern int ip_vs_estimator_init(void);
-extern void ip_vs_estimator_cleanup(void);
 extern void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats);
 extern void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats);
 extern void ip_vs_zero_estimator(struct ip_vs_stats *stats);
index e223fb749ddfe4aeb1e3e500c041b57bdcbebf69..fe6cb4304d72fbdf461f63f4eaad9bf0cda6e35e 100644 (file)
@@ -589,13 +589,3 @@ void __net_exit ip_vs_app_net_cleanup(struct net *net)
 {
        proc_net_remove(net, "ip_vs_app");
 }
-
-int __init ip_vs_app_init(void)
-{
-       return 0;
-}
-
-
-void ip_vs_app_cleanup(void)
-{
-}
index 6cefe322b044d29bffbf69ca516b183545fb8294..2200bae1d4dd59af86af15aafd6568a7ec0480ce 100644 (file)
@@ -1967,36 +1967,23 @@ static int __init ip_vs_init(void)
 {
        int ret;
 
-       ip_vs_estimator_init();
        ret = ip_vs_control_init();
        if (ret < 0) {
                pr_err("can't setup control.\n");
-               goto cleanup_estimator;
+               goto exit;
        }
 
        ip_vs_protocol_init();
 
-       ret = ip_vs_app_init();
-       if (ret < 0) {
-               pr_err("can't setup application helper.\n");
-               goto cleanup_protocol;
-       }
-
        ret = ip_vs_conn_init();
        if (ret < 0) {
                pr_err("can't setup connection table.\n");
-               goto cleanup_app;
-       }
-
-       ret = ip_vs_sync_init();
-       if (ret < 0) {
-               pr_err("can't setup sync data.\n");
-               goto cleanup_conn;
+               goto cleanup_protocol;
        }
 
        ret = register_pernet_subsys(&ipvs_core_ops);   /* Alloc ip_vs struct */
        if (ret < 0)
-               goto cleanup_sync;
+               goto cleanup_conn;
 
        ret = register_pernet_device(&ipvs_core_dev_ops);
        if (ret < 0)
@@ -2016,17 +2003,12 @@ cleanup_dev:
        unregister_pernet_device(&ipvs_core_dev_ops);
 cleanup_sub:
        unregister_pernet_subsys(&ipvs_core_ops);
-cleanup_sync:
-       ip_vs_sync_cleanup();
 cleanup_conn:
        ip_vs_conn_cleanup();
-cleanup_app:
-       ip_vs_app_cleanup();
 cleanup_protocol:
        ip_vs_protocol_cleanup();
        ip_vs_control_cleanup();
-cleanup_estimator:
-       ip_vs_estimator_cleanup();
+exit:
        return ret;
 }
 
@@ -2035,12 +2017,9 @@ static void __exit ip_vs_cleanup(void)
        nf_unregister_hooks(ip_vs_ops, ARRAY_SIZE(ip_vs_ops));
        unregister_pernet_device(&ipvs_core_dev_ops);
        unregister_pernet_subsys(&ipvs_core_ops);       /* free ip_vs struct */
-       ip_vs_sync_cleanup();
        ip_vs_conn_cleanup();
-       ip_vs_app_cleanup();
        ip_vs_protocol_cleanup();
        ip_vs_control_cleanup();
-       ip_vs_estimator_cleanup();
        pr_info("ipvs unloaded.\n");
 }
 
index f5d2a01d69d41928386dd3dd1bfa43897e2d7ed6..0fac6017b6fbc37e522a0bd9d2e39ffd9c31d1b3 100644 (file)
@@ -207,12 +207,3 @@ void __net_exit ip_vs_estimator_net_cleanup(struct net *net)
 {
        del_timer_sync(&net_ipvs(net)->est_timer);
 }
-
-int __init ip_vs_estimator_init(void)
-{
-       return 0;
-}
-
-void ip_vs_estimator_cleanup(void)
-{
-}
index 58bfabbe744616dfd7531de432e073331b89cf3b..7ee7215b8ba048ffa94256a41b42b763b371fe71 100644 (file)
@@ -1689,12 +1689,3 @@ void ip_vs_sync_net_cleanup(struct net *net)
        if (retc && retc != -ESRCH)
                pr_err("Failed to stop Backup Daemon\n");
 }
-
-int __init ip_vs_sync_init(void)
-{
-       return 0;
-}
-
-void ip_vs_sync_cleanup(void)
-{
-}
This page took 0.0307 seconds and 5 git commands to generate.