diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-02-18 02:34:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-18 20:53:08 +0100 |
commit | ece31ffd539e8e2b586b1ca5f50bc4f4591e3893 (patch) | |
tree | 05407d915a4c0be78a4aa85f54ae3b148ec91ea3 /net/core | |
parent | net: proc: remove proc_net_fops_create (diff) | |
download | linux-ece31ffd539e8e2b586b1ca5f50bc4f4591e3893.tar.xz linux-ece31ffd539e8e2b586b1ca5f50bc4f4591e3893.zip |
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.c | 12 | ||||
-rw-r--r-- | net/core/dev_addr_lists.c | 2 | ||||
-rw-r--r-- | net/core/pktgen.c | 4 | ||||
-rw-r--r-- | net/core/sock.c | 2 |
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) out: return rc; out_ptype: - proc_net_remove(net, "ptype"); + remove_proc_entry("ptype", net->proc_net); out_softnet: - proc_net_remove(net, "softnet_stat"); + remove_proc_entry("softnet_stat", net->proc_net); out_dev: - proc_net_remove(net, "dev"); + remove_proc_entry("dev", net->proc_net); goto out; } @@ -4544,9 +4544,9 @@ static void __net_exit dev_proc_net_exit(struct net *net) { wext_proc_exit(net); - proc_net_remove(net, "ptype"); - proc_net_remove(net, "softnet_stat"); - proc_net_remove(net, "dev"); + remove_proc_entry("ptype", net->proc_net); + remove_proc_entry("softnet_stat", net->proc_net); + remove_proc_entry("dev", net->proc_net); } static 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) static void __net_exit dev_mc_net_exit(struct net *net) { - proc_net_remove(net, "dev_mcast"); + remove_proc_entry("dev_mcast", net->proc_net); } static 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) remove_entry: remove_proc_entry(PGCTRL, pn->proc_dir); remove: - proc_net_remove(pn->net, PG_PROC_DIR); + remove_proc_entry(PG_PROC_DIR, pn->net->proc_net); return ret; } @@ -3676,7 +3676,7 @@ static void __net_exit pg_net_exit(struct net *net) } remove_proc_entry(PGCTRL, pn->proc_dir); - proc_net_remove(pn->net, PG_PROC_DIR); + remove_proc_entry(PG_PROC_DIR, pn->net->proc_net); } static 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) static __net_exit void proto_exit_net(struct net *net) { - proc_net_remove(net, "protocols"); + remove_proc_entry("protocols", net->proc_net); } |