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>
This commit is contained in:
parent
b4278c961a
commit
ece31ffd53
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1412,7 +1412,7 @@ static int __net_init arp_net_init(struct net *net)
|
|||
|
||||
static void __net_exit arp_net_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "arp");
|
||||
remove_proc_entry("arp", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations arp_net_ops = {
|
||||
|
|
|
@ -2620,18 +2620,18 @@ int __net_init fib_proc_init(struct net *net)
|
|||
return 0;
|
||||
|
||||
out3:
|
||||
proc_net_remove(net, "fib_triestat");
|
||||
remove_proc_entry("fib_triestat", net->proc_net);
|
||||
out2:
|
||||
proc_net_remove(net, "fib_trie");
|
||||
remove_proc_entry("fib_trie", net->proc_net);
|
||||
out1:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
void __net_exit fib_proc_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "fib_trie");
|
||||
proc_net_remove(net, "fib_triestat");
|
||||
proc_net_remove(net, "route");
|
||||
remove_proc_entry("fib_trie", net->proc_net);
|
||||
remove_proc_entry("fib_triestat", net->proc_net);
|
||||
remove_proc_entry("route", net->proc_net);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
|
|
@ -2656,15 +2656,15 @@ static int __net_init igmp_net_init(struct net *net)
|
|||
return 0;
|
||||
|
||||
out_mcfilter:
|
||||
proc_net_remove(net, "igmp");
|
||||
remove_proc_entry("igmp", net->proc_net);
|
||||
out_igmp:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void __net_exit igmp_net_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "mcfilter");
|
||||
proc_net_remove(net, "igmp");
|
||||
remove_proc_entry("mcfilter", net->proc_net);
|
||||
remove_proc_entry("igmp", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations igmp_net_ops = {
|
||||
|
|
|
@ -2712,7 +2712,7 @@ static int __net_init ipmr_net_init(struct net *net)
|
|||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_cache_fail:
|
||||
proc_net_remove(net, "ip_mr_vif");
|
||||
remove_proc_entry("ip_mr_vif", net->proc_net);
|
||||
proc_vif_fail:
|
||||
ipmr_rules_exit(net);
|
||||
#endif
|
||||
|
@ -2723,8 +2723,8 @@ static int __net_init ipmr_net_init(struct net *net)
|
|||
static void __net_exit ipmr_net_exit(struct net *net)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_net_remove(net, "ip_mr_cache");
|
||||
proc_net_remove(net, "ip_mr_vif");
|
||||
remove_proc_entry("ip_mr_cache", net->proc_net);
|
||||
remove_proc_entry("ip_mr_vif", net->proc_net);
|
||||
#endif
|
||||
ipmr_rules_exit(net);
|
||||
}
|
||||
|
|
|
@ -433,9 +433,9 @@ static int __net_init ip_conntrack_net_init(struct net *net)
|
|||
return 0;
|
||||
|
||||
err3:
|
||||
proc_net_remove(net, "ip_conntrack_expect");
|
||||
remove_proc_entry("ip_conntrack_expect", net->proc_net);
|
||||
err2:
|
||||
proc_net_remove(net, "ip_conntrack");
|
||||
remove_proc_entry("ip_conntrack", net->proc_net);
|
||||
err1:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -443,8 +443,8 @@ static int __net_init ip_conntrack_net_init(struct net *net)
|
|||
static void __net_exit ip_conntrack_net_exit(struct net *net)
|
||||
{
|
||||
remove_proc_entry("ip_conntrack", net->proc_net_stat);
|
||||
proc_net_remove(net, "ip_conntrack_expect");
|
||||
proc_net_remove(net, "ip_conntrack");
|
||||
remove_proc_entry("ip_conntrack_expect", net->proc_net);
|
||||
remove_proc_entry("ip_conntrack", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations ip_conntrack_net_ops = {
|
||||
|
|
|
@ -897,7 +897,7 @@ static int ping_proc_register(struct net *net)
|
|||
|
||||
static void ping_proc_unregister(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "icmp");
|
||||
remove_proc_entry("icmp", net->proc_net);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -482,18 +482,18 @@ static __net_init int ip_proc_init_net(struct net *net)
|
|||
return 0;
|
||||
|
||||
out_snmp:
|
||||
proc_net_remove(net, "netstat");
|
||||
remove_proc_entry("netstat", net->proc_net);
|
||||
out_netstat:
|
||||
proc_net_remove(net, "sockstat");
|
||||
remove_proc_entry("sockstat", net->proc_net);
|
||||
out_sockstat:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static __net_exit void ip_proc_exit_net(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "snmp");
|
||||
proc_net_remove(net, "netstat");
|
||||
proc_net_remove(net, "sockstat");
|
||||
remove_proc_entry("snmp", net->proc_net);
|
||||
remove_proc_entry("netstat", net->proc_net);
|
||||
remove_proc_entry("sockstat", net->proc_net);
|
||||
}
|
||||
|
||||
static __net_initdata struct pernet_operations ip_proc_ops = {
|
||||
|
|
|
@ -1058,7 +1058,7 @@ static __net_init int raw_init_net(struct net *net)
|
|||
|
||||
static __net_exit void raw_exit_net(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "raw");
|
||||
remove_proc_entry("raw", net->proc_net);
|
||||
}
|
||||
|
||||
static __net_initdata struct pernet_operations raw_net_ops = {
|
||||
|
|
|
@ -2616,7 +2616,7 @@ EXPORT_SYMBOL(tcp_proc_register);
|
|||
|
||||
void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo)
|
||||
{
|
||||
proc_net_remove(net, afinfo->name);
|
||||
remove_proc_entry(afinfo->name, net->proc_net);
|
||||
}
|
||||
EXPORT_SYMBOL(tcp_proc_unregister);
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ static __init int tcpprobe_init(void)
|
|||
pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize);
|
||||
return 0;
|
||||
err1:
|
||||
proc_net_remove(&init_net, procname);
|
||||
remove_proc_entry(procname, init_net.proc_net);
|
||||
err0:
|
||||
kfree(tcp_probe.log);
|
||||
return ret;
|
||||
|
@ -253,7 +253,7 @@ module_init(tcpprobe_init);
|
|||
|
||||
static __exit void tcpprobe_exit(void)
|
||||
{
|
||||
proc_net_remove(&init_net, procname);
|
||||
remove_proc_entry(procname, init_net.proc_net);
|
||||
unregister_jprobe(&tcp_jprobe);
|
||||
kfree(tcp_probe.log);
|
||||
}
|
||||
|
|
|
@ -2122,7 +2122,7 @@ EXPORT_SYMBOL(udp_proc_register);
|
|||
|
||||
void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
|
||||
{
|
||||
proc_net_remove(net, afinfo->name);
|
||||
remove_proc_entry(afinfo->name, net->proc_net);
|
||||
}
|
||||
EXPORT_SYMBOL(udp_proc_unregister);
|
||||
|
||||
|
|
|
@ -3332,7 +3332,7 @@ static int __net_init if6_proc_net_init(struct net *net)
|
|||
|
||||
static void __net_exit if6_proc_net_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "if_inet6");
|
||||
remove_proc_entry("if_inet6", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations if6_proc_net_ops = {
|
||||
|
|
|
@ -517,7 +517,7 @@ int __net_init ac6_proc_init(struct net *net)
|
|||
|
||||
void ac6_proc_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "anycast6");
|
||||
remove_proc_entry("anycast6", net->proc_net);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -814,7 +814,7 @@ static int __net_init ip6_flowlabel_proc_init(struct net *net)
|
|||
|
||||
static void __net_exit ip6_flowlabel_proc_fini(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "ip6_flowlabel");
|
||||
remove_proc_entry("ip6_flowlabel", net->proc_net);
|
||||
}
|
||||
#else
|
||||
static inline int ip6_flowlabel_proc_init(struct net *net)
|
||||
|
|
|
@ -1369,7 +1369,7 @@ static int __net_init ip6mr_net_init(struct net *net)
|
|||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_cache_fail:
|
||||
proc_net_remove(net, "ip6_mr_vif");
|
||||
remove_proc_entry("ip6_mr_vif", net->proc_net);
|
||||
proc_vif_fail:
|
||||
ip6mr_rules_exit(net);
|
||||
#endif
|
||||
|
@ -1380,8 +1380,8 @@ static int __net_init ip6mr_net_init(struct net *net)
|
|||
static void __net_exit ip6mr_net_exit(struct net *net)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_net_remove(net, "ip6_mr_cache");
|
||||
proc_net_remove(net, "ip6_mr_vif");
|
||||
remove_proc_entry("ip6_mr_cache", net->proc_net);
|
||||
remove_proc_entry("ip6_mr_vif", net->proc_net);
|
||||
#endif
|
||||
ip6mr_rules_exit(net);
|
||||
}
|
||||
|
|
|
@ -2610,14 +2610,14 @@ static int __net_init igmp6_proc_init(struct net *net)
|
|||
return err;
|
||||
|
||||
out_proc_net_igmp6:
|
||||
proc_net_remove(net, "igmp6");
|
||||
remove_proc_entry("igmp6", net->proc_net);
|
||||
goto out;
|
||||
}
|
||||
|
||||
static void __net_exit igmp6_proc_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "mcfilter6");
|
||||
proc_net_remove(net, "igmp6");
|
||||
remove_proc_entry("mcfilter6", net->proc_net);
|
||||
remove_proc_entry("igmp6", net->proc_net);
|
||||
}
|
||||
#else
|
||||
static inline int igmp6_proc_init(struct net *net)
|
||||
|
|
|
@ -308,17 +308,17 @@ static int __net_init ipv6_proc_init_net(struct net *net)
|
|||
return 0;
|
||||
|
||||
proc_dev_snmp6_fail:
|
||||
proc_net_remove(net, "snmp6");
|
||||
remove_proc_entry("snmp6", net->proc_net);
|
||||
proc_snmp6_fail:
|
||||
proc_net_remove(net, "sockstat6");
|
||||
remove_proc_entry("sockstat6", net->proc_net);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void __net_exit ipv6_proc_exit_net(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "sockstat6");
|
||||
proc_net_remove(net, "dev_snmp6");
|
||||
proc_net_remove(net, "snmp6");
|
||||
remove_proc_entry("sockstat6", net->proc_net);
|
||||
remove_proc_entry("dev_snmp6", net->proc_net);
|
||||
remove_proc_entry("snmp6", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations ipv6_proc_ops = {
|
||||
|
|
|
@ -1300,7 +1300,7 @@ static int __net_init raw6_init_net(struct net *net)
|
|||
|
||||
static void __net_exit raw6_exit_net(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "raw6");
|
||||
remove_proc_entry("raw6", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations raw6_net_ops = {
|
||||
|
|
|
@ -3004,8 +3004,8 @@ static int __net_init ip6_route_net_init_late(struct net *net)
|
|||
static void __net_exit ip6_route_net_exit_late(struct net *net)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_net_remove(net, "ipv6_route");
|
||||
proc_net_remove(net, "rt6_stats");
|
||||
remove_proc_entry("ipv6_route", net->proc_net);
|
||||
remove_proc_entry("rt6_stats", net->proc_net);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -3749,7 +3749,7 @@ static int __net_init pfkey_init_proc(struct net *net)
|
|||
|
||||
static void __net_exit pfkey_exit_proc(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "pfkey");
|
||||
remove_proc_entry("pfkey", net->proc_net);
|
||||
}
|
||||
#else
|
||||
static inline int pfkey_init_proc(struct net *net)
|
||||
|
|
|
@ -1796,7 +1796,7 @@ static __net_init int pppol2tp_init_net(struct net *net)
|
|||
|
||||
static __net_exit void pppol2tp_exit_net(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "pppol2tp");
|
||||
remove_proc_entry("pppol2tp", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations pppol2tp_net_ops = {
|
||||
|
|
|
@ -612,5 +612,5 @@ int __net_init ip_vs_app_net_init(struct net *net)
|
|||
void __net_exit ip_vs_app_net_cleanup(struct net *net)
|
||||
{
|
||||
unregister_ip_vs_app(net, NULL /* all */);
|
||||
proc_net_remove(net, "ip_vs_app");
|
||||
remove_proc_entry("ip_vs_app", net->proc_net);
|
||||
}
|
||||
|
|
|
@ -1300,8 +1300,8 @@ void __net_exit ip_vs_conn_net_cleanup(struct net *net)
|
|||
{
|
||||
/* flush all the connection entries first */
|
||||
ip_vs_conn_flush(net);
|
||||
proc_net_remove(net, "ip_vs_conn");
|
||||
proc_net_remove(net, "ip_vs_conn_sync");
|
||||
remove_proc_entry("ip_vs_conn", net->proc_net);
|
||||
remove_proc_entry("ip_vs_conn_sync", net->proc_net);
|
||||
}
|
||||
|
||||
int __init ip_vs_conn_init(void)
|
||||
|
|
|
@ -3822,9 +3822,9 @@ void __net_exit ip_vs_control_net_cleanup(struct net *net)
|
|||
ip_vs_trash_cleanup(net);
|
||||
ip_vs_stop_estimator(net, &ipvs->tot_stats);
|
||||
ip_vs_control_net_cleanup_sysctl(net);
|
||||
proc_net_remove(net, "ip_vs_stats_percpu");
|
||||
proc_net_remove(net, "ip_vs_stats");
|
||||
proc_net_remove(net, "ip_vs");
|
||||
remove_proc_entry("ip_vs_stats_percpu", net->proc_net);
|
||||
remove_proc_entry("ip_vs_stats", net->proc_net);
|
||||
remove_proc_entry("ip_vs", net->proc_net);
|
||||
free_percpu(ipvs->tot_stats.cpustats);
|
||||
}
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ static int exp_proc_init(struct net *net)
|
|||
static void exp_proc_remove(struct net *net)
|
||||
{
|
||||
#ifdef CONFIG_NF_CONNTRACK_PROCFS
|
||||
proc_net_remove(net, "nf_conntrack_expect");
|
||||
remove_proc_entry("nf_conntrack_expect", net->proc_net);
|
||||
#endif /* CONFIG_NF_CONNTRACK_PROCFS */
|
||||
}
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ static int nf_conntrack_standalone_init_proc(struct net *net)
|
|||
return 0;
|
||||
|
||||
out_stat_nf_conntrack:
|
||||
proc_net_remove(net, "nf_conntrack");
|
||||
remove_proc_entry("nf_conntrack", net->proc_net);
|
||||
out_nf_conntrack:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ static int nf_conntrack_standalone_init_proc(struct net *net)
|
|||
static void nf_conntrack_standalone_fini_proc(struct net *net)
|
||||
{
|
||||
remove_proc_entry("nf_conntrack", net->proc_net_stat);
|
||||
proc_net_remove(net, "nf_conntrack");
|
||||
remove_proc_entry("nf_conntrack", net->proc_net);
|
||||
}
|
||||
#else
|
||||
static int nf_conntrack_standalone_init_proc(struct net *net)
|
||||
|
|
|
@ -1323,12 +1323,12 @@ int xt_proto_init(struct net *net, u_int8_t af)
|
|||
out_remove_matches:
|
||||
strlcpy(buf, xt_prefix[af], sizeof(buf));
|
||||
strlcat(buf, FORMAT_MATCHES, sizeof(buf));
|
||||
proc_net_remove(net, buf);
|
||||
remove_proc_entry(buf, net->proc_net);
|
||||
|
||||
out_remove_tables:
|
||||
strlcpy(buf, xt_prefix[af], sizeof(buf));
|
||||
strlcat(buf, FORMAT_TABLES, sizeof(buf));
|
||||
proc_net_remove(net, buf);
|
||||
remove_proc_entry(buf, net->proc_net);
|
||||
out:
|
||||
return -1;
|
||||
#endif
|
||||
|
@ -1342,15 +1342,15 @@ void xt_proto_fini(struct net *net, u_int8_t af)
|
|||
|
||||
strlcpy(buf, xt_prefix[af], sizeof(buf));
|
||||
strlcat(buf, FORMAT_TABLES, sizeof(buf));
|
||||
proc_net_remove(net, buf);
|
||||
remove_proc_entry(buf, net->proc_net);
|
||||
|
||||
strlcpy(buf, xt_prefix[af], sizeof(buf));
|
||||
strlcat(buf, FORMAT_TARGETS, sizeof(buf));
|
||||
proc_net_remove(net, buf);
|
||||
remove_proc_entry(buf, net->proc_net);
|
||||
|
||||
strlcpy(buf, xt_prefix[af], sizeof(buf));
|
||||
strlcat(buf, FORMAT_MATCHES, sizeof(buf));
|
||||
proc_net_remove(net, buf);
|
||||
remove_proc_entry(buf, net->proc_net);
|
||||
#endif /*CONFIG_PROC_FS*/
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xt_proto_fini);
|
||||
|
|
|
@ -867,7 +867,7 @@ static int __net_init hashlimit_proc_net_init(struct net *net)
|
|||
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
|
||||
hashlimit_net->ip6t_hashlimit = proc_mkdir("ip6t_hashlimit", net->proc_net);
|
||||
if (!hashlimit_net->ip6t_hashlimit) {
|
||||
proc_net_remove(net, "ipt_hashlimit");
|
||||
remove_proc_entry("ipt_hashlimit", net->proc_net);
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
|
@ -897,9 +897,9 @@ static void __net_exit hashlimit_proc_net_exit(struct net *net)
|
|||
hashlimit_net->ip6t_hashlimit = NULL;
|
||||
mutex_unlock(&hashlimit_mutex);
|
||||
|
||||
proc_net_remove(net, "ipt_hashlimit");
|
||||
remove_proc_entry("ipt_hashlimit", net->proc_net);
|
||||
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
|
||||
proc_net_remove(net, "ip6t_hashlimit");
|
||||
remove_proc_entry("ip6t_hashlimit", net->proc_net);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ static void __net_exit recent_proc_net_exit(struct net *net)
|
|||
recent_net->xt_recent = NULL;
|
||||
spin_unlock_bh(&recent_lock);
|
||||
|
||||
proc_net_remove(net, "xt_recent");
|
||||
remove_proc_entry("xt_recent", net->proc_net);
|
||||
}
|
||||
#else
|
||||
static inline int recent_proc_net_init(struct net *net)
|
||||
|
|
|
@ -2154,7 +2154,7 @@ static int __net_init netlink_net_init(struct net *net)
|
|||
static void __net_exit netlink_net_exit(struct net *net)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_net_remove(net, "netlink");
|
||||
remove_proc_entry("netlink", net->proc_net);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1482,9 +1482,9 @@ static void __exit nr_exit(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
proc_net_remove(&init_net, "nr");
|
||||
proc_net_remove(&init_net, "nr_neigh");
|
||||
proc_net_remove(&init_net, "nr_nodes");
|
||||
remove_proc_entry("nr", init_net.proc_net);
|
||||
remove_proc_entry("nr_neigh", init_net.proc_net);
|
||||
remove_proc_entry("nr_nodes", init_net.proc_net);
|
||||
nr_loopback_clear();
|
||||
|
||||
nr_rt_free();
|
||||
|
|
|
@ -3836,7 +3836,7 @@ static int __net_init packet_net_init(struct net *net)
|
|||
|
||||
static void __net_exit packet_net_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "packet");
|
||||
remove_proc_entry("packet", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations packet_net_ops = {
|
||||
|
|
|
@ -331,7 +331,7 @@ static int __net_init phonet_init_net(struct net *net)
|
|||
|
||||
static void __net_exit phonet_exit_net(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "phonet");
|
||||
remove_proc_entry("phonet", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations phonet_net_ops = {
|
||||
|
@ -361,7 +361,7 @@ void phonet_device_exit(void)
|
|||
rtnl_unregister_all(PF_PHONET);
|
||||
unregister_netdevice_notifier(&phonet_device_notifier);
|
||||
unregister_pernet_subsys(&phonet_net_ops);
|
||||
proc_net_remove(&init_net, "pnresource");
|
||||
remove_proc_entry("pnresource", init_net.proc_net);
|
||||
}
|
||||
|
||||
int phonet_route_add(struct net_device *dev, u8 daddr)
|
||||
|
|
|
@ -1608,10 +1608,10 @@ static void __exit rose_exit(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
proc_net_remove(&init_net, "rose");
|
||||
proc_net_remove(&init_net, "rose_neigh");
|
||||
proc_net_remove(&init_net, "rose_nodes");
|
||||
proc_net_remove(&init_net, "rose_routes");
|
||||
remove_proc_entry("rose", init_net.proc_net);
|
||||
remove_proc_entry("rose_neigh", init_net.proc_net);
|
||||
remove_proc_entry("rose_nodes", init_net.proc_net);
|
||||
remove_proc_entry("rose_routes", init_net.proc_net);
|
||||
rose_loopback_clear();
|
||||
|
||||
rose_rt_free();
|
||||
|
|
|
@ -879,8 +879,8 @@ static void __exit af_rxrpc_exit(void)
|
|||
|
||||
_debug("flush scheduled work");
|
||||
flush_workqueue(rxrpc_workqueue);
|
||||
proc_net_remove(&init_net, "rxrpc_conns");
|
||||
proc_net_remove(&init_net, "rxrpc_calls");
|
||||
remove_proc_entry("rxrpc_conns", init_net.proc_net);
|
||||
remove_proc_entry("rxrpc_calls", init_net.proc_net);
|
||||
destroy_workqueue(rxrpc_workqueue);
|
||||
kmem_cache_destroy(rxrpc_call_jar);
|
||||
_leave("");
|
||||
|
|
|
@ -1777,7 +1777,7 @@ static int __net_init psched_net_init(struct net *net)
|
|||
|
||||
static void __net_exit psched_net_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "psched");
|
||||
remove_proc_entry("psched", net->proc_net);
|
||||
}
|
||||
#else
|
||||
static int __net_init psched_net_init(struct net *net)
|
||||
|
|
|
@ -208,7 +208,7 @@ static __init int sctpprobe_init(void)
|
|||
return 0;
|
||||
|
||||
remove_proc:
|
||||
proc_net_remove(&init_net, procname);
|
||||
remove_proc_entry(procname, init_net.proc_net);
|
||||
free_kfifo:
|
||||
kfifo_free(&sctpw.fifo);
|
||||
return ret;
|
||||
|
@ -217,7 +217,7 @@ static __init int sctpprobe_init(void)
|
|||
static __exit void sctpprobe_exit(void)
|
||||
{
|
||||
kfifo_free(&sctpw.fifo);
|
||||
proc_net_remove(&init_net, procname);
|
||||
remove_proc_entry(procname, init_net.proc_net);
|
||||
unregister_jprobe(&sctp_recv_probe);
|
||||
}
|
||||
|
||||
|
|
|
@ -2415,7 +2415,7 @@ static int __net_init unix_net_init(struct net *net)
|
|||
static void __net_exit unix_net_exit(struct net *net)
|
||||
{
|
||||
unix_sysctl_unregister(net);
|
||||
proc_net_remove(net, "unix");
|
||||
remove_proc_entry("unix", net->proc_net);
|
||||
}
|
||||
|
||||
static struct pernet_operations unix_net_ops = {
|
||||
|
|
|
@ -152,5 +152,5 @@ int __net_init wext_proc_init(struct net *net)
|
|||
|
||||
void __net_exit wext_proc_exit(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "wireless");
|
||||
remove_proc_entry("wireless", net->proc_net);
|
||||
}
|
||||
|
|
|
@ -82,5 +82,5 @@ int __net_init xfrm_proc_init(struct net *net)
|
|||
|
||||
void xfrm_proc_fini(struct net *net)
|
||||
{
|
||||
proc_net_remove(net, "xfrm_stat");
|
||||
remove_proc_entry("xfrm_stat", net->proc_net);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user