Commit ece31ffd authored by Gao feng's avatar Gao feng Committed by David S. Miller
Browse files

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: default avatarGao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4278c96
......@@ -287,7 +287,7 @@ static void cn_fini(void)
cn_already_initialized = 0;
proc_net_remove(&init_net, "connector");
remove_proc_entry("connector", init_net.proc_net);
cn_queue_free_dev(dev->cbdev);
netlink_kernel_release(dev->nls);
......
......@@ -611,7 +611,7 @@ static void __exit bpq_cleanup_driver(void)
unregister_netdevice_notifier(&bpq_dev_notifier);
proc_net_remove(&init_net, "bpqether");
remove_proc_entry("bpqether", init_net.proc_net);
rtnl_lock();
while (!list_empty(&bpq_devices)) {
......
......@@ -2173,7 +2173,7 @@ static void __exit scc_cleanup_driver(void)
if (Vector_Latch)
release_region(Vector_Latch, 1);
proc_net_remove(&init_net, "z8530drv");
remove_proc_entry("z8530drv", init_net.proc_net);
}
MODULE_AUTHOR("Joerg Reuter <jreuter@yaina.de>");
......
......@@ -1199,7 +1199,7 @@ static void __exit yam_cleanup_driver(void)
kfree(p);
}
proc_net_remove(&init_net, "yam");
remove_proc_entry("yam", init_net.proc_net);
}
/* --------------------------------------------------------------------- */
......
......@@ -1145,7 +1145,7 @@ static __net_init int pppoe_init_net(struct net *net)
static __net_exit void pppoe_exit_net(struct net *net)
{
proc_net_remove(net, "pppoe");
remove_proc_entry("pppoe", net->proc_net);
}
static struct pernet_operations pppoe_net_ops = {
......
......@@ -131,7 +131,7 @@ void vlan_proc_cleanup(struct net *net)
remove_proc_entry(name_conf, vn->proc_vlan_dir);
if (vn->proc_vlan_dir)
proc_net_remove(net, name_root);
remove_proc_entry(name_root, net->proc_net);
/* Dynamically added entries should be cleaned up as their vlan_device
* is removed, so we should not have to take care of it here...
......
......@@ -460,7 +460,7 @@ static void atm_proc_dirs_remove(void)
if (e->dirent)
remove_proc_entry(e->name, atm_proc_root);
}
proc_net_remove(&init_net, "atm");
remove_proc_entry("atm", init_net.proc_net);
}
int __init atm_proc_init(void)
......
......@@ -2009,9 +2009,9 @@ MODULE_ALIAS_NETPROTO(PF_AX25);
static void __exit ax25_exit(void)
{
proc_net_remove(&init_net, "ax25_route");
proc_net_remove(&init_net, "ax25");
proc_net_remove(&init_net, "ax25_calls");
remove_proc_entry("ax25_route", init_net.proc_net);
remove_proc_entry("ax25", init_net.proc_net);
remove_proc_entry("ax25_calls", init_net.proc_net);
unregister_netdevice_notifier(&ax25_dev_notifier);
......
......@@ -652,7 +652,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,
void bt_procfs_cleanup(struct net *net, const char *name)
{
proc_net_remove(net, name);
remove_proc_entry(name, net->proc_net);
}
#else
int bt_procfs_init(struct module* module, struct net *net, const char *name,
......
......@@ -1633,7 +1633,7 @@ static void __exit bcm_module_exit(void)
can_proto_unregister(&bcm_can_proto);
if (proc_dir)
proc_net_remove(&init_net, "can-bcm");
remove_proc_entry("can-bcm", init_net.proc_net);
}
module_init(bcm_module_init);
......
......@@ -531,5 +531,5 @@ void can_remove_proc(void)
can_remove_proc_readentry(CAN_PROC_RCVLIST_SFF);
if (can_dir)
proc_net_remove(&init_net, "can");
remove_proc_entry("can", init_net.proc_net);
}
......@@ -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 = {
......
......@@ -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 = {
......
......@@ -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 = {
......
......@@ -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);
}
......
......@@ -181,7 +181,7 @@ static __init int dccpprobe_init(void)
pr_info("DCCP watch registered (port=%d)\n", port);
return 0;
err1:
proc_net_remove(&init_net, procname);
remove_proc_entry(procname, init_net.proc_net);
err0:
kfifo_free(&dccpw.fifo);
return ret;
......@@ -191,7 +191,7 @@ module_init(dccpprobe_init);
static __exit void dccpprobe_exit(void)
{
kfifo_free(&dccpw.fifo);
proc_net_remove(&init_net, procname);
remove_proc_entry(procname, init_net.proc_net);
unregister_jprobe(&dccp_send_probe);
}
......
......@@ -2413,7 +2413,7 @@ static void __exit decnet_exit(void)
dn_neigh_cleanup();
dn_fib_cleanup();
proc_net_remove(&init_net, "decnet");
remove_proc_entry("decnet", init_net.proc_net);
proto_unregister(&dn_proto);
......
......@@ -1433,7 +1433,7 @@ void __exit dn_dev_cleanup(void)
}
#endif /* CONFIG_SYSCTL */
proc_net_remove(&init_net, "decnet_dev");
remove_proc_entry("decnet_dev", init_net.proc_net);
dn_dev_devices_off();
}
......@@ -596,6 +596,6 @@ void __init dn_neigh_init(void)
void __exit dn_neigh_cleanup(void)
{
proc_net_remove(&init_net, "decnet_neigh");
remove_proc_entry("decnet_neigh", init_net.proc_net);
neigh_table_clear(&dn_neigh_table);
}
......@@ -1918,7 +1918,7 @@ void __exit dn_route_cleanup(void)
del_timer(&dn_route_timer);
dn_run_flush(0);
proc_net_remove(&init_net, "decnet_cache");
remove_proc_entry("decnet_cache", init_net.proc_net);
dst_entries_destroy(&dn_dst_ops);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment