aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2013-02-17 20:34:56 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-18 14:53:08 -0500
commitece31ffd539e8e2b586b1ca5f50bc4f4591e3893 (patch)
tree05407d915a4c0be78a4aa85f54ae3b148ec91ea3 /net/ipv4
parentb4278c961aca320839964e23cfc7906ff61af0c2 (diff)
net: proc: change proc_net_remove to remove_proc_entry
proc_net_remove is only used to remove proc entries that under /proc/net,it's not a general function for removing proc entries of netns. if we want to remove some proc entries which under /proc/net/stat/, we still need to call remove_proc_entry. this patch use remove_proc_entry to replace proc_net_remove. we can remove proc_net_remove after this patch. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/arp.c2
-rw-r--r--net/ipv4/fib_trie.c10
-rw-r--r--net/ipv4/igmp.c6
-rw-r--r--net/ipv4/ipmr.c6
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c8
-rw-r--r--net/ipv4/ping.c2
-rw-r--r--net/ipv4/proc.c10
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv4/tcp_probe.c4
-rw-r--r--net/ipv4/udp.c2
11 files changed, 27 insertions, 27 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index b04c114ef055..fea4929f6200 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1412,7 +1412,7 @@ static int __net_init arp_net_init(struct net *net)
1412 1412
1413static void __net_exit arp_net_exit(struct net *net) 1413static void __net_exit arp_net_exit(struct net *net)
1414{ 1414{
1415 proc_net_remove(net, "arp"); 1415 remove_proc_entry("arp", net->proc_net);
1416} 1416}
1417 1417
1418static struct pernet_operations arp_net_ops = { 1418static struct pernet_operations arp_net_ops = {
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 67c1d4b641d4..61e03da3e1f5 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2620,18 +2620,18 @@ int __net_init fib_proc_init(struct net *net)
2620 return 0; 2620 return 0;
2621 2621
2622out3: 2622out3:
2623 proc_net_remove(net, "fib_triestat"); 2623 remove_proc_entry("fib_triestat", net->proc_net);
2624out2: 2624out2:
2625 proc_net_remove(net, "fib_trie"); 2625 remove_proc_entry("fib_trie", net->proc_net);
2626out1: 2626out1:
2627 return -ENOMEM; 2627 return -ENOMEM;
2628} 2628}
2629 2629
2630void __net_exit fib_proc_exit(struct net *net) 2630void __net_exit fib_proc_exit(struct net *net)
2631{ 2631{
2632 proc_net_remove(net, "fib_trie"); 2632 remove_proc_entry("fib_trie", net->proc_net);
2633 proc_net_remove(net, "fib_triestat"); 2633 remove_proc_entry("fib_triestat", net->proc_net);
2634 proc_net_remove(net, "route"); 2634 remove_proc_entry("route", net->proc_net);
2635} 2635}
2636 2636
2637#endif /* CONFIG_PROC_FS */ 2637#endif /* CONFIG_PROC_FS */
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index be85628e6a83..d8c232794bcb 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2656,15 +2656,15 @@ static int __net_init igmp_net_init(struct net *net)
2656 return 0; 2656 return 0;
2657 2657
2658out_mcfilter: 2658out_mcfilter:
2659 proc_net_remove(net, "igmp"); 2659 remove_proc_entry("igmp", net->proc_net);
2660out_igmp: 2660out_igmp:
2661 return -ENOMEM; 2661 return -ENOMEM;
2662} 2662}
2663 2663
2664static void __net_exit igmp_net_exit(struct net *net) 2664static void __net_exit igmp_net_exit(struct net *net)
2665{ 2665{
2666 proc_net_remove(net, "mcfilter"); 2666 remove_proc_entry("mcfilter", net->proc_net);
2667 proc_net_remove(net, "igmp"); 2667 remove_proc_entry("igmp", net->proc_net);
2668} 2668}
2669 2669
2670static struct pernet_operations igmp_net_ops = { 2670static struct pernet_operations igmp_net_ops = {
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 160a8b8e9cae..5f95b3aa579e 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -2712,7 +2712,7 @@ static int __net_init ipmr_net_init(struct net *net)
2712 2712
2713#ifdef CONFIG_PROC_FS 2713#ifdef CONFIG_PROC_FS
2714proc_cache_fail: 2714proc_cache_fail:
2715 proc_net_remove(net, "ip_mr_vif"); 2715 remove_proc_entry("ip_mr_vif", net->proc_net);
2716proc_vif_fail: 2716proc_vif_fail:
2717 ipmr_rules_exit(net); 2717 ipmr_rules_exit(net);
2718#endif 2718#endif
@@ -2723,8 +2723,8 @@ fail:
2723static void __net_exit ipmr_net_exit(struct net *net) 2723static void __net_exit ipmr_net_exit(struct net *net)
2724{ 2724{
2725#ifdef CONFIG_PROC_FS 2725#ifdef CONFIG_PROC_FS
2726 proc_net_remove(net, "ip_mr_cache"); 2726 remove_proc_entry("ip_mr_cache", net->proc_net);
2727 proc_net_remove(net, "ip_mr_vif"); 2727 remove_proc_entry("ip_mr_vif", net->proc_net);
2728#endif 2728#endif
2729 ipmr_rules_exit(net); 2729 ipmr_rules_exit(net);
2730} 2730}
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
index 48bc681f5d32..f2ca12794081 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
@@ -433,9 +433,9 @@ static int __net_init ip_conntrack_net_init(struct net *net)
433 return 0; 433 return 0;
434 434
435err3: 435err3:
436 proc_net_remove(net, "ip_conntrack_expect"); 436 remove_proc_entry("ip_conntrack_expect", net->proc_net);
437err2: 437err2:
438 proc_net_remove(net, "ip_conntrack"); 438 remove_proc_entry("ip_conntrack", net->proc_net);
439err1: 439err1:
440 return -ENOMEM; 440 return -ENOMEM;
441} 441}
@@ -443,8 +443,8 @@ err1:
443static void __net_exit ip_conntrack_net_exit(struct net *net) 443static void __net_exit ip_conntrack_net_exit(struct net *net)
444{ 444{
445 remove_proc_entry("ip_conntrack", net->proc_net_stat); 445 remove_proc_entry("ip_conntrack", net->proc_net_stat);
446 proc_net_remove(net, "ip_conntrack_expect"); 446 remove_proc_entry("ip_conntrack_expect", net->proc_net);
447 proc_net_remove(net, "ip_conntrack"); 447 remove_proc_entry("ip_conntrack", net->proc_net);
448} 448}
449 449
450static struct pernet_operations ip_conntrack_net_ops = { 450static struct pernet_operations ip_conntrack_net_ops = {
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index fc62a13b5eef..55c4ee1bba06 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -897,7 +897,7 @@ static int ping_proc_register(struct net *net)
897 897
898static void ping_proc_unregister(struct net *net) 898static void ping_proc_unregister(struct net *net)
899{ 899{
900 proc_net_remove(net, "icmp"); 900 remove_proc_entry("icmp", net->proc_net);
901} 901}
902 902
903 903
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 954bcd42d50e..32030a24e776 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -482,18 +482,18 @@ static __net_init int ip_proc_init_net(struct net *net)
482 return 0; 482 return 0;
483 483
484out_snmp: 484out_snmp:
485 proc_net_remove(net, "netstat"); 485 remove_proc_entry("netstat", net->proc_net);
486out_netstat: 486out_netstat:
487 proc_net_remove(net, "sockstat"); 487 remove_proc_entry("sockstat", net->proc_net);
488out_sockstat: 488out_sockstat:
489 return -ENOMEM; 489 return -ENOMEM;
490} 490}
491 491
492static __net_exit void ip_proc_exit_net(struct net *net) 492static __net_exit void ip_proc_exit_net(struct net *net)
493{ 493{
494 proc_net_remove(net, "snmp"); 494 remove_proc_entry("snmp", net->proc_net);
495 proc_net_remove(net, "netstat"); 495 remove_proc_entry("netstat", net->proc_net);
496 proc_net_remove(net, "sockstat"); 496 remove_proc_entry("sockstat", net->proc_net);
497} 497}
498 498
499static __net_initdata struct pernet_operations ip_proc_ops = { 499static __net_initdata struct pernet_operations ip_proc_ops = {
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 5043a7d0c64e..53ddebc292b6 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -1058,7 +1058,7 @@ static __net_init int raw_init_net(struct net *net)
1058 1058
1059static __net_exit void raw_exit_net(struct net *net) 1059static __net_exit void raw_exit_net(struct net *net)
1060{ 1060{
1061 proc_net_remove(net, "raw"); 1061 remove_proc_entry("raw", net->proc_net);
1062} 1062}
1063 1063
1064static __net_initdata struct pernet_operations raw_net_ops = { 1064static __net_initdata struct pernet_operations raw_net_ops = {
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 77f5050efc8d..145d3bf8df86 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2616,7 +2616,7 @@ EXPORT_SYMBOL(tcp_proc_register);
2616 2616
2617void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo) 2617void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo)
2618{ 2618{
2619 proc_net_remove(net, afinfo->name); 2619 remove_proc_entry(afinfo->name, net->proc_net);
2620} 2620}
2621EXPORT_SYMBOL(tcp_proc_unregister); 2621EXPORT_SYMBOL(tcp_proc_unregister);
2622 2622
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index 1e3a1fb3c0cd..d4943f67aff2 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -244,7 +244,7 @@ static __init int tcpprobe_init(void)
244 pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize); 244 pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize);
245 return 0; 245 return 0;
246 err1: 246 err1:
247 proc_net_remove(&init_net, procname); 247 remove_proc_entry(procname, init_net.proc_net);
248 err0: 248 err0:
249 kfree(tcp_probe.log); 249 kfree(tcp_probe.log);
250 return ret; 250 return ret;
@@ -253,7 +253,7 @@ module_init(tcpprobe_init);
253 253
254static __exit void tcpprobe_exit(void) 254static __exit void tcpprobe_exit(void)
255{ 255{
256 proc_net_remove(&init_net, procname); 256 remove_proc_entry(procname, init_net.proc_net);
257 unregister_jprobe(&tcp_jprobe); 257 unregister_jprobe(&tcp_jprobe);
258 kfree(tcp_probe.log); 258 kfree(tcp_probe.log);
259} 259}
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 39a5e7a9a77f..265c42cf963c 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2122,7 +2122,7 @@ EXPORT_SYMBOL(udp_proc_register);
2122 2122
2123void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo) 2123void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
2124{ 2124{
2125 proc_net_remove(net, afinfo->name); 2125 remove_proc_entry(afinfo->name, net->proc_net);
2126} 2126}
2127EXPORT_SYMBOL(udp_proc_unregister); 2127EXPORT_SYMBOL(udp_proc_unregister);
2128 2128