aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Schillstrom <hans@schillstrom.com>2011-05-01 12:50:16 -0400
committerSimon Horman <horms@verge.net.au>2011-06-13 04:10:09 -0400
commit503cf15a5ecc0f3f7a05ffe04c89fb7496100ee7 (patch)
treeda33790829b1587261193d1c859da9de3a7035e6
parented78bec4d6873e8971f56557f8ca3bcda38044ea (diff)
IPVS: rename of netns init and cleanup functions.
Make it more clear what the functions does, on request by Julian. Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-off-by: Hans Schillstrom <hans@schillstrom.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--include/net/ip_vs.h26
-rw-r--r--net/netfilter/ipvs/ip_vs_app.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c36
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c20
-rw-r--r--net/netfilter/ipvs/ip_vs_est.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_sync.c4
8 files changed, 51 insertions, 51 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 34a6fa825167..1b0985fca1e2 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1087,19 +1087,19 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
1087/* 1087/*
1088 * IPVS netns init & cleanup functions 1088 * IPVS netns init & cleanup functions
1089 */ 1089 */
1090extern int __ip_vs_estimator_init(struct net *net); 1090extern int ip_vs_estimator_net_init(struct net *net);
1091extern int __ip_vs_control_init(struct net *net); 1091extern int ip_vs_control_net_init(struct net *net);
1092extern int __ip_vs_protocol_init(struct net *net); 1092extern int ip_vs_protocol_net_init(struct net *net);
1093extern int __ip_vs_app_init(struct net *net); 1093extern int ip_vs_app_net_init(struct net *net);
1094extern int __ip_vs_conn_init(struct net *net); 1094extern int ip_vs_conn_net_init(struct net *net);
1095extern int __ip_vs_sync_init(struct net *net); 1095extern int ip_vs_sync_net_init(struct net *net);
1096extern void __ip_vs_conn_cleanup(struct net *net); 1096extern void ip_vs_conn_net_cleanup(struct net *net);
1097extern void __ip_vs_app_cleanup(struct net *net); 1097extern void ip_vs_app_net_cleanup(struct net *net);
1098extern void __ip_vs_protocol_cleanup(struct net *net); 1098extern void ip_vs_protocol_net_cleanup(struct net *net);
1099extern void __ip_vs_control_cleanup(struct net *net); 1099extern void ip_vs_control_net_cleanup(struct net *net);
1100extern void __ip_vs_estimator_cleanup(struct net *net); 1100extern void ip_vs_estimator_net_cleanup(struct net *net);
1101extern void __ip_vs_sync_cleanup(struct net *net); 1101extern void ip_vs_sync_net_cleanup(struct net *net);
1102extern void __ip_vs_service_cleanup(struct net *net); 1102extern void ip_vs_service_net_cleanup(struct net *net);
1103 1103
1104/* 1104/*
1105 * IPVS application functions 1105 * IPVS application functions
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c
index 059af3120be7..e223fb749ddf 100644
--- a/net/netfilter/ipvs/ip_vs_app.c
+++ b/net/netfilter/ipvs/ip_vs_app.c
@@ -576,7 +576,7 @@ static const struct file_operations ip_vs_app_fops = {
576}; 576};
577#endif 577#endif
578 578
579int __net_init __ip_vs_app_init(struct net *net) 579int __net_init ip_vs_app_net_init(struct net *net)
580{ 580{
581 struct netns_ipvs *ipvs = net_ipvs(net); 581 struct netns_ipvs *ipvs = net_ipvs(net);
582 582
@@ -585,7 +585,7 @@ int __net_init __ip_vs_app_init(struct net *net)
585 return 0; 585 return 0;
586} 586}
587 587
588void __net_exit __ip_vs_app_cleanup(struct net *net) 588void __net_exit ip_vs_app_net_cleanup(struct net *net)
589{ 589{
590 proc_net_remove(net, "ip_vs_app"); 590 proc_net_remove(net, "ip_vs_app");
591} 591}
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index bf28ac2fc99b..77c61b0b6d68 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1247,7 +1247,7 @@ flush_again:
1247/* 1247/*
1248 * per netns init and exit 1248 * per netns init and exit
1249 */ 1249 */
1250int __net_init __ip_vs_conn_init(struct net *net) 1250int __net_init ip_vs_conn_net_init(struct net *net)
1251{ 1251{
1252 struct netns_ipvs *ipvs = net_ipvs(net); 1252 struct netns_ipvs *ipvs = net_ipvs(net);
1253 1253
@@ -1258,7 +1258,7 @@ int __net_init __ip_vs_conn_init(struct net *net)
1258 return 0; 1258 return 0;
1259} 1259}
1260 1260
1261void __net_exit __ip_vs_conn_cleanup(struct net *net) 1261void __net_exit ip_vs_conn_net_cleanup(struct net *net)
1262{ 1262{
1263 /* flush all the connection entries first */ 1263 /* flush all the connection entries first */
1264 ip_vs_conn_flush(net); 1264 ip_vs_conn_flush(net);
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index bfa808f4da13..7c2c72699c8d 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1891,22 +1891,22 @@ static int __net_init __ip_vs_init(struct net *net)
1891 atomic_inc(&ipvs_netns_cnt); 1891 atomic_inc(&ipvs_netns_cnt);
1892 net->ipvs = ipvs; 1892 net->ipvs = ipvs;
1893 1893
1894 if (__ip_vs_estimator_init(net) < 0) 1894 if (ip_vs_estimator_net_init(net) < 0)
1895 goto estimator_fail; 1895 goto estimator_fail;
1896 1896
1897 if (__ip_vs_control_init(net) < 0) 1897 if (ip_vs_control_net_init(net) < 0)
1898 goto control_fail; 1898 goto control_fail;
1899 1899
1900 if (__ip_vs_protocol_init(net) < 0) 1900 if (ip_vs_protocol_net_init(net) < 0)
1901 goto protocol_fail; 1901 goto protocol_fail;
1902 1902
1903 if (__ip_vs_app_init(net) < 0) 1903 if (ip_vs_app_net_init(net) < 0)
1904 goto app_fail; 1904 goto app_fail;
1905 1905
1906 if (__ip_vs_conn_init(net) < 0) 1906 if (ip_vs_conn_net_init(net) < 0)
1907 goto conn_fail; 1907 goto conn_fail;
1908 1908
1909 if (__ip_vs_sync_init(net) < 0) 1909 if (ip_vs_sync_net_init(net) < 0)
1910 goto sync_fail; 1910 goto sync_fail;
1911 1911
1912 printk(KERN_INFO "IPVS: Creating netns size=%zu id=%d\n", 1912 printk(KERN_INFO "IPVS: Creating netns size=%zu id=%d\n",
@@ -1917,27 +1917,27 @@ static int __net_init __ip_vs_init(struct net *net)
1917 */ 1917 */
1918 1918
1919sync_fail: 1919sync_fail:
1920 __ip_vs_conn_cleanup(net); 1920 ip_vs_conn_net_cleanup(net);
1921conn_fail: 1921conn_fail:
1922 __ip_vs_app_cleanup(net); 1922 ip_vs_app_net_cleanup(net);
1923app_fail: 1923app_fail:
1924 __ip_vs_protocol_cleanup(net); 1924 ip_vs_protocol_net_cleanup(net);
1925protocol_fail: 1925protocol_fail:
1926 __ip_vs_control_cleanup(net); 1926 ip_vs_control_net_cleanup(net);
1927control_fail: 1927control_fail:
1928 __ip_vs_estimator_cleanup(net); 1928 ip_vs_estimator_net_cleanup(net);
1929estimator_fail: 1929estimator_fail:
1930 return -ENOMEM; 1930 return -ENOMEM;
1931} 1931}
1932 1932
1933static void __net_exit __ip_vs_cleanup(struct net *net) 1933static void __net_exit __ip_vs_cleanup(struct net *net)
1934{ 1934{
1935 __ip_vs_service_cleanup(net); /* ip_vs_flush() with locks */ 1935 ip_vs_service_net_cleanup(net); /* ip_vs_flush() with locks */
1936 __ip_vs_conn_cleanup(net); 1936 ip_vs_conn_net_cleanup(net);
1937 __ip_vs_app_cleanup(net); 1937 ip_vs_app_net_cleanup(net);
1938 __ip_vs_protocol_cleanup(net); 1938 ip_vs_protocol_net_cleanup(net);
1939 __ip_vs_control_cleanup(net); 1939 ip_vs_control_net_cleanup(net);
1940 __ip_vs_estimator_cleanup(net); 1940 ip_vs_estimator_net_cleanup(net);
1941 IP_VS_DBG(2, "ipvs netns %d released\n", net_ipvs(net)->gen); 1941 IP_VS_DBG(2, "ipvs netns %d released\n", net_ipvs(net)->gen);
1942} 1942}
1943 1943
@@ -1945,7 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
1945{ 1945{
1946 EnterFunction(2); 1946 EnterFunction(2);
1947 net_ipvs(net)->enable = 0; /* Disable packet reception */ 1947 net_ipvs(net)->enable = 0; /* Disable packet reception */
1948 __ip_vs_sync_cleanup(net); 1948 ip_vs_sync_net_cleanup(net);
1949 LeaveFunction(2); 1949 LeaveFunction(2);
1950} 1950}
1951 1951
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 699c79a55657..6bedea120b10 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1483,7 +1483,7 @@ static int ip_vs_flush(struct net *net)
1483 * Delete service by {netns} in the service table. 1483 * Delete service by {netns} in the service table.
1484 * Called by __ip_vs_cleanup() 1484 * Called by __ip_vs_cleanup()
1485 */ 1485 */
1486void __ip_vs_service_cleanup(struct net *net) 1486void ip_vs_service_net_cleanup(struct net *net)
1487{ 1487{
1488 EnterFunction(2); 1488 EnterFunction(2);
1489 /* Check for "full" addressed entries */ 1489 /* Check for "full" addressed entries */
@@ -1662,7 +1662,7 @@ proc_do_sync_mode(ctl_table *table, int write,
1662/* 1662/*
1663 * IPVS sysctl table (under the /proc/sys/net/ipv4/vs/) 1663 * IPVS sysctl table (under the /proc/sys/net/ipv4/vs/)
1664 * Do not change order or insert new entries without 1664 * Do not change order or insert new entries without
1665 * align with netns init in __ip_vs_control_init() 1665 * align with netns init in ip_vs_control_net_init()
1666 */ 1666 */
1667 1667
1668static struct ctl_table vs_vars[] = { 1668static struct ctl_table vs_vars[] = {
@@ -3595,7 +3595,7 @@ static void ip_vs_genl_unregister(void)
3595 * per netns intit/exit func. 3595 * per netns intit/exit func.
3596 */ 3596 */
3597#ifdef CONFIG_SYSCTL 3597#ifdef CONFIG_SYSCTL
3598int __net_init __ip_vs_control_init_sysctl(struct net *net) 3598int __net_init ip_vs_control_net_init_sysctl(struct net *net)
3599{ 3599{
3600 int idx; 3600 int idx;
3601 struct netns_ipvs *ipvs = net_ipvs(net); 3601 struct netns_ipvs *ipvs = net_ipvs(net);
@@ -3654,7 +3654,7 @@ int __net_init __ip_vs_control_init_sysctl(struct net *net)
3654 return 0; 3654 return 0;
3655} 3655}
3656 3656
3657void __net_init __ip_vs_control_cleanup_sysctl(struct net *net) 3657void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net)
3658{ 3658{
3659 struct netns_ipvs *ipvs = net_ipvs(net); 3659 struct netns_ipvs *ipvs = net_ipvs(net);
3660 3660
@@ -3665,8 +3665,8 @@ void __net_init __ip_vs_control_cleanup_sysctl(struct net *net)
3665 3665
3666#else 3666#else
3667 3667
3668int __net_init __ip_vs_control_init_sysctl(struct net *net) { return 0; } 3668int __net_init ip_vs_control_net_init_sysctl(struct net *net) { return 0; }
3669void __net_init __ip_vs_control_cleanup_sysctl(struct net *net) { } 3669void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net) { }
3670 3670
3671#endif 3671#endif
3672 3672
@@ -3674,7 +3674,7 @@ static struct notifier_block ip_vs_dst_notifier = {
3674 .notifier_call = ip_vs_dst_event, 3674 .notifier_call = ip_vs_dst_event,
3675}; 3675};
3676 3676
3677int __net_init __ip_vs_control_init(struct net *net) 3677int __net_init ip_vs_control_net_init(struct net *net)
3678{ 3678{
3679 int idx; 3679 int idx;
3680 struct netns_ipvs *ipvs = net_ipvs(net); 3680 struct netns_ipvs *ipvs = net_ipvs(net);
@@ -3702,7 +3702,7 @@ int __net_init __ip_vs_control_init(struct net *net)
3702 proc_net_fops_create(net, "ip_vs_stats_percpu", 0, 3702 proc_net_fops_create(net, "ip_vs_stats_percpu", 0,
3703 &ip_vs_stats_percpu_fops); 3703 &ip_vs_stats_percpu_fops);
3704 3704
3705 if (__ip_vs_control_init_sysctl(net)) 3705 if (ip_vs_control_net_init_sysctl(net))
3706 goto err; 3706 goto err;
3707 3707
3708 return 0; 3708 return 0;
@@ -3712,13 +3712,13 @@ err:
3712 return -ENOMEM; 3712 return -ENOMEM;
3713} 3713}
3714 3714
3715void __net_exit __ip_vs_control_cleanup(struct net *net) 3715void __net_exit ip_vs_control_net_cleanup(struct net *net)
3716{ 3716{
3717 struct netns_ipvs *ipvs = net_ipvs(net); 3717 struct netns_ipvs *ipvs = net_ipvs(net);
3718 3718
3719 ip_vs_trash_cleanup(net); 3719 ip_vs_trash_cleanup(net);
3720 ip_vs_stop_estimator(net, &ipvs->tot_stats); 3720 ip_vs_stop_estimator(net, &ipvs->tot_stats);
3721 __ip_vs_control_cleanup_sysctl(net); 3721 ip_vs_control_net_cleanup_sysctl(net);
3722 proc_net_remove(net, "ip_vs_stats_percpu"); 3722 proc_net_remove(net, "ip_vs_stats_percpu");
3723 proc_net_remove(net, "ip_vs_stats"); 3723 proc_net_remove(net, "ip_vs_stats");
3724 proc_net_remove(net, "ip_vs"); 3724 proc_net_remove(net, "ip_vs");
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c
index 508cce98777c..f5d2a01d69d4 100644
--- a/net/netfilter/ipvs/ip_vs_est.c
+++ b/net/netfilter/ipvs/ip_vs_est.c
@@ -192,7 +192,7 @@ void ip_vs_read_estimator(struct ip_vs_stats_user *dst,
192 dst->outbps = (e->outbps + 0xF) >> 5; 192 dst->outbps = (e->outbps + 0xF) >> 5;
193} 193}
194 194
195int __net_init __ip_vs_estimator_init(struct net *net) 195int __net_init ip_vs_estimator_net_init(struct net *net)
196{ 196{
197 struct netns_ipvs *ipvs = net_ipvs(net); 197 struct netns_ipvs *ipvs = net_ipvs(net);
198 198
@@ -203,7 +203,7 @@ int __net_init __ip_vs_estimator_init(struct net *net)
203 return 0; 203 return 0;
204} 204}
205 205
206void __net_exit __ip_vs_estimator_cleanup(struct net *net) 206void __net_exit ip_vs_estimator_net_cleanup(struct net *net)
207{ 207{
208 del_timer_sync(&net_ipvs(net)->est_timer); 208 del_timer_sync(&net_ipvs(net)->est_timer);
209} 209}
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index eb86028536fc..52d073c105e9 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -316,7 +316,7 @@ ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp,
316/* 316/*
317 * per network name-space init 317 * per network name-space init
318 */ 318 */
319int __net_init __ip_vs_protocol_init(struct net *net) 319int __net_init ip_vs_protocol_net_init(struct net *net)
320{ 320{
321#ifdef CONFIG_IP_VS_PROTO_TCP 321#ifdef CONFIG_IP_VS_PROTO_TCP
322 register_ip_vs_proto_netns(net, &ip_vs_protocol_tcp); 322 register_ip_vs_proto_netns(net, &ip_vs_protocol_tcp);
@@ -336,7 +336,7 @@ int __net_init __ip_vs_protocol_init(struct net *net)
336 return 0; 336 return 0;
337} 337}
338 338
339void __net_exit __ip_vs_protocol_cleanup(struct net *net) 339void __net_exit ip_vs_protocol_net_cleanup(struct net *net)
340{ 340{
341 struct netns_ipvs *ipvs = net_ipvs(net); 341 struct netns_ipvs *ipvs = net_ipvs(net);
342 struct ip_vs_proto_data *pd; 342 struct ip_vs_proto_data *pd;
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index e292e5bddc70..58bfabbe7446 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1663,7 +1663,7 @@ int stop_sync_thread(struct net *net, int state)
1663/* 1663/*
1664 * Initialize data struct for each netns 1664 * Initialize data struct for each netns
1665 */ 1665 */
1666int __net_init __ip_vs_sync_init(struct net *net) 1666int __net_init ip_vs_sync_net_init(struct net *net)
1667{ 1667{
1668 struct netns_ipvs *ipvs = net_ipvs(net); 1668 struct netns_ipvs *ipvs = net_ipvs(net);
1669 1669
@@ -1677,7 +1677,7 @@ int __net_init __ip_vs_sync_init(struct net *net)
1677 return 0; 1677 return 0;
1678} 1678}
1679 1679
1680void __ip_vs_sync_cleanup(struct net *net) 1680void ip_vs_sync_net_cleanup(struct net *net)
1681{ 1681{
1682 int retc; 1682 int retc;
1683 1683