aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
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/core
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/core')
-rw-r--r--net/core/dev.c12
-rw-r--r--net/core/dev_addr_lists.c2
-rw-r--r--net/core/pktgen.c4
-rw-r--r--net/core/sock.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f2f81ef5bbd6..decf55f9ad80 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4532,11 +4532,11 @@ static int __net_init dev_proc_net_init(struct net *net)
4532out: 4532out:
4533 return rc; 4533 return rc;
4534out_ptype: 4534out_ptype:
4535 proc_net_remove(net, "ptype"); 4535 remove_proc_entry("ptype", net->proc_net);
4536out_softnet: 4536out_softnet:
4537 proc_net_remove(net, "softnet_stat"); 4537 remove_proc_entry("softnet_stat", net->proc_net);
4538out_dev: 4538out_dev:
4539 proc_net_remove(net, "dev"); 4539 remove_proc_entry("dev", net->proc_net);
4540 goto out; 4540 goto out;
4541} 4541}
4542 4542
@@ -4544,9 +4544,9 @@ static void __net_exit dev_proc_net_exit(struct net *net)
4544{ 4544{
4545 wext_proc_exit(net); 4545 wext_proc_exit(net);
4546 4546
4547 proc_net_remove(net, "ptype"); 4547 remove_proc_entry("ptype", net->proc_net);
4548 proc_net_remove(net, "softnet_stat"); 4548 remove_proc_entry("softnet_stat", net->proc_net);
4549 proc_net_remove(net, "dev"); 4549 remove_proc_entry("dev", net->proc_net);
4550} 4550}
4551 4551
4552static struct pernet_operations __net_initdata dev_proc_ops = { 4552static struct pernet_operations __net_initdata dev_proc_ops = {
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c
index 7c62ec449f3c..89562529df45 100644
--- a/net/core/dev_addr_lists.c
+++ b/net/core/dev_addr_lists.c
@@ -787,7 +787,7 @@ static int __net_init dev_mc_net_init(struct net *net)
787 787
788static void __net_exit dev_mc_net_exit(struct net *net) 788static void __net_exit dev_mc_net_exit(struct net *net)
789{ 789{
790 proc_net_remove(net, "dev_mcast"); 790 remove_proc_entry("dev_mcast", net->proc_net);
791} 791}
792 792
793static struct pernet_operations __net_initdata dev_mc_net_ops = { 793static struct pernet_operations __net_initdata dev_mc_net_ops = {
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 2201e699ad67..6048fc1da1c2 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3650,7 +3650,7 @@ static int __net_init pg_net_init(struct net *net)
3650remove_entry: 3650remove_entry:
3651 remove_proc_entry(PGCTRL, pn->proc_dir); 3651 remove_proc_entry(PGCTRL, pn->proc_dir);
3652remove: 3652remove:
3653 proc_net_remove(pn->net, PG_PROC_DIR); 3653 remove_proc_entry(PG_PROC_DIR, pn->net->proc_net);
3654 return ret; 3654 return ret;
3655} 3655}
3656 3656
@@ -3676,7 +3676,7 @@ static void __net_exit pg_net_exit(struct net *net)
3676 } 3676 }
3677 3677
3678 remove_proc_entry(PGCTRL, pn->proc_dir); 3678 remove_proc_entry(PGCTRL, pn->proc_dir);
3679 proc_net_remove(pn->net, PG_PROC_DIR); 3679 remove_proc_entry(PG_PROC_DIR, pn->net->proc_net);
3680} 3680}
3681 3681
3682static struct pernet_operations pg_net_ops = { 3682static struct pernet_operations pg_net_ops = {
diff --git a/net/core/sock.c b/net/core/sock.c
index b4d562ef36fb..fe96c5d34299 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2844,7 +2844,7 @@ static __net_init int proto_init_net(struct net *net)
2844 2844
2845static __net_exit void proto_exit_net(struct net *net) 2845static __net_exit void proto_exit_net(struct net *net)
2846{ 2846{
2847 proc_net_remove(net, "protocols"); 2847 remove_proc_entry("protocols", net->proc_net);
2848} 2848}
2849 2849
2850 2850