<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">
<div><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">20 июля 2017 г. 23:34 пользователь Andrey Vagin <avagin@virtuozzo.com> написал:<br type="attribution">
<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><font size="2"><span style="font-size:10pt">
<div>On Thu, Jul 20, 2017 at 08:47:58PM +0400, Stanislav Kinsburskiy wrote:<br>
> Use proc_net_create() and proc_net_create_data() for all the per-net dentries.<br>
> We need this to expose per-net sysfs dentries once commit<br>
> e5990221bde54d757a5b5d85e81b2535064570ad is reverted<br>
<br>
Could you give more details? Do you mean proc dentries?<br>
</div>
</span></font></div>
</blockquote>
</div>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Yes, my bad. Should be "proc" instead of "sysfs.</div>
<div dir="auto">Thanks.</div>
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><font size="2"><span style="font-size:10pt">
<div><br>
> <br>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com><br>
> ---<br>
> drivers/net/ppp/pppoe.c | 2 +-<br>
> net/bluetooth/af_bluetooth.c | 2 +-<br>
> net/core/net-procfs.c | 8 ++++----<br>
> net/core/pktgen.c | 2 +-<br>
> net/core/sock.c | 2 +-<br>
> net/ipv4/arp.c | 2 +-<br>
> net/ipv4/fib_trie.c | 6 +++---<br>
> net/ipv4/igmp.c | 4 ++--<br>
> net/ipv4/ipmr.c | 4 ++--<br>
> net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-<br>
> .../netfilter/nf_conntrack_l3proto_ipv4_compat.c | 8 ++++----<br>
> net/ipv4/ping.c | 2 +-<br>
> net/ipv4/proc.c | 6 +++---<br>
> net/ipv4/raw.c | 2 +-<br>
> net/ipv4/route.c | 10 +++++-----<br>
> net/ipv6/addrconf.c | 2 +-<br>
> net/ipv6/anycast.c | 2 +-<br>
> net/ipv6/ip6_flowlabel.c | 2 +-<br>
> net/ipv6/ip6mr.c | 4 ++--<br>
> net/ipv6/mcast.c | 4 ++--<br>
> net/ipv6/proc.c | 4 ++--<br>
> net/ipv6/raw.c | 2 +-<br>
> net/ipv6/route.c | 4 ++--<br>
> net/key/af_key.c | 2 +-<br>
> net/l2tp/l2tp_ppp.c | 2 +-<br>
> net/netfilter/ipvs/ip_vs_app.c | 2 +-<br>
> net/netfilter/ipvs/ip_vs_conn.c | 4 ++--<br>
> net/netfilter/ipvs/ip_vs_ctl.c | 6 +++---<br>
> net/netfilter/nf_conntrack_expect.c | 2 +-<br>
> net/netfilter/nf_conntrack_standalone.c | 6 +++---<br>
> net/netfilter/nf_synproxy_core.c | 2 +-<br>
> net/netlink/af_netlink.c | 2 +-<br>
> net/packet/af_packet.c | 2 +-<br>
> net/phonet/pn_dev.c | 2 +-<br>
> net/sched/sch_api.c | 2 +-<br>
> net/unix/af_unix.c | 2 +-<br>
> net/wireless/wext-proc.c | 2 +-<br>
> net/xfrm/xfrm_proc.c | 2 +-<br>
> 38 files changed, 63 insertions(+), 63 deletions(-)<br>
> <br>
> diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c<br>
> index afa3299..faa8ffa 100644<br>
> --- a/drivers/net/ppp/pppoe.c<br>
> +++ b/drivers/net/ppp/pppoe.c<br>
> @@ -1166,7 +1166,7 @@ static __net_init int pppoe_init_net(struct net *net)<br>
> <br>
> rwlock_init(&pn->hash_lock);<br>
> <br>
> - pde = proc_create("pppoe", S_IRUGO, net->proc_net, &pppoe_seq_fops);<br>
> + pde = proc_net_create("pppoe", S_IRUGO, net->proc_net, &pppoe_seq_fops);<br>
> #ifdef CONFIG_PROC_FS<br>
> if (!pde)<br>
> return -ENOMEM;<br>
> diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c<br>
> index d5d9422..f0f03ad 100644<br>
> --- a/net/bluetooth/af_bluetooth.c<br>
> +++ b/net/bluetooth/af_bluetooth.c<br>
> @@ -674,7 +674,7 @@ int bt_procfs_init(struct net *net, const char *name,<br>
> {<!-- --><br>
> sk_list->custom_seq_show = seq_show;<br>
> <br>
> - if (!proc_create_data(name, 0, net->proc_net, &bt_fops, sk_list))<br>
> + if (!proc_net_create_data(name, 0, net->proc_net, &bt_fops, sk_list))<br>
> return -ENOMEM;<br>
> return 0;<br>
> }<br>
> diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c<br>
> index 569d355..0ea5ce9 100644<br>
> --- a/net/core/net-procfs.c<br>
> +++ b/net/core/net-procfs.c<br>
> @@ -304,12 +304,12 @@ static int __net_init dev_proc_net_init(struct net *net)<br>
> {<!-- --><br>
> int rc = -ENOMEM;<br>
> <br>
> - if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops))<br>
> + if (!proc_net_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops))<br>
> goto out;<br>
> - if (!proc_create("softnet_stat", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("softnet_stat", S_IRUGO, net->proc_net,<br>
> &softnet_seq_fops))<br>
> goto out_dev;<br>
> - if (!proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops))<br>
> + if (!proc_net_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops))<br>
> goto out_softnet;<br>
> <br>
> if (wext_proc_init(net))<br>
> @@ -387,7 +387,7 @@ static const struct file_operations dev_mc_seq_fops = {<!-- --><br>
> <br>
> static int __net_init dev_mc_net_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("dev_mcast", 0, net->proc_net, &dev_mc_seq_fops))<br>
> + if (!proc_net_create("dev_mcast", 0, net->proc_net, &dev_mc_seq_fops))<br>
> return -ENOMEM;<br>
> return 0;<br>
> }<br>
> diff --git a/net/core/pktgen.c b/net/core/pktgen.c<br>
> index 49c1ef5..8b7d3be 100644<br>
> --- a/net/core/pktgen.c<br>
> +++ b/net/core/pktgen.c<br>
> @@ -3661,7 +3661,7 @@ static int __net_init pg_net_init(struct net *net)<br>
> pn->net = net;<br>
> INIT_LIST_HEAD(&pn->pktgen_threads);<br>
> pn->pktgen_exiting = false;<br>
> - pn->proc_dir = proc_mkdir(PG_PROC_DIR, pn->net->proc_net);<br>
> + pn->proc_dir = proc_net_mkdir(pn->net, PG_PROC_DIR, pn->net->proc_net);<br>
> if (!pn->proc_dir) {<!-- --><br>
> pr_warn("cannot create /proc/net/%s\n", PG_PROC_DIR);<br>
> return -ENODEV;<br>
> diff --git a/net/core/sock.c b/net/core/sock.c<br>
> index f74fcc2..50fad24 100644<br>
> --- a/net/core/sock.c<br>
> +++ b/net/core/sock.c<br>
> @@ -2924,7 +2924,7 @@ static const struct file_operations proto_seq_fops = {<!-- --><br>
> <br>
> static __net_init int proto_init_net(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("protocols", S_IRUGO, net->proc_net, &proto_seq_fops))<br>
> + if (!proc_net_create("protocols", S_IRUGO, net->proc_net, &proto_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> return 0;<br>
> diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c<br>
> index 376534c..93ad65f 100644<br>
> --- a/net/ipv4/arp.c<br>
> +++ b/net/ipv4/arp.c<br>
> @@ -1447,7 +1447,7 @@ static const struct file_operations arp_seq_fops = {<!-- --><br>
> <br>
> static int __net_init arp_net_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("arp", S_IRUGO, net->proc_net, &arp_seq_fops))<br>
> + if (!proc_net_create("arp", S_IRUGO, net->proc_net, &arp_seq_fops))<br>
> return -ENOMEM;<br>
> return 0;<br>
> }<br>
> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c<br>
> index 0787d97..a55098e 100644<br>
> --- a/net/ipv4/fib_trie.c<br>
> +++ b/net/ipv4/fib_trie.c<br>
> @@ -2374,14 +2374,14 @@ static const struct file_operations fib_route_fops = {<!-- --><br>
> <br>
> int __net_init fib_proc_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("fib_trie", S_IRUGO, net->proc_net, &fib_trie_fops))<br>
> + if (!proc_net_create("fib_trie", S_IRUGO, net->proc_net, &fib_trie_fops))<br>
> goto out1;<br>
> <br>
> - if (!proc_create("fib_triestat", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("fib_triestat", S_IRUGO, net->proc_net,<br>
> &fib_triestat_fops))<br>
> goto out2;<br>
> <br>
> - if (!proc_create("route", S_IRUGO, net->proc_net, &fib_route_fops))<br>
> + if (!proc_net_create("route", S_IRUGO, net->proc_net, &fib_route_fops))<br>
> goto out3;<br>
> <br>
> return 0;<br>
> diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c<br>
> index 15b4fce..6ea0236 100644<br>
> --- a/net/ipv4/igmp.c<br>
> +++ b/net/ipv4/igmp.c<br>
> @@ -2641,10 +2641,10 @@ static int __net_init igmp_net_init(struct net *net)<br>
> struct proc_dir_entry *pde;<br>
> int err;<br>
> <br>
> - pde = proc_create("igmp", S_IRUGO, net->proc_net, &igmp_mc_seq_fops);<br>
> + pde = proc_net_create("igmp", S_IRUGO, net->proc_net, &igmp_mc_seq_fops);<br>
> if (!pde)<br>
> goto out_igmp;<br>
> - pde = proc_create("mcfilter", S_IRUGO, net->proc_net,<br>
> + pde = proc_net_create("mcfilter", S_IRUGO, net->proc_net,<br>
> &igmp_mcf_seq_fops);<br>
> if (!pde)<br>
> goto out_mcfilter;<br>
> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c<br>
> index e88822e..e3ff3aa 100644<br>
> --- a/net/ipv4/ipmr.c<br>
> +++ b/net/ipv4/ipmr.c<br>
> @@ -2718,9 +2718,9 @@ static int __net_init ipmr_net_init(struct net *net)<br>
> <br>
> #ifdef CONFIG_PROC_FS<br>
> err = -ENOMEM;<br>
> - if (!proc_create("ip_mr_vif", 0, net->proc_net, &ipmr_vif_fops))<br>
> + if (!proc_net_create("ip_mr_vif", 0, net->proc_net, &ipmr_vif_fops))<br>
> goto proc_vif_fail;<br>
> - if (!proc_create("ip_mr_cache", 0, net->proc_net, &ipmr_mfc_fops))<br>
> + if (!proc_net_create("ip_mr_cache", 0, net->proc_net, &ipmr_mfc_fops))<br>
> goto proc_cache_fail;<br>
> #endif<br>
> return 0;<br>
> diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c<br>
> index 1a2d03e..e8309b8 100644<br>
> --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c<br>
> +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c<br>
> @@ -727,7 +727,7 @@ static int clusterip_net_init(struct net *net)<br>
> spin_lock_init(&cn->lock);<br>
> <br>
> #ifdef CONFIG_PROC_FS<br>
> - cn->procdir = proc_mkdir("ipt_CLUSTERIP", net->proc_net);<br>
> + cn->procdir = proc_net_mkdir(net, "ipt_CLUSTERIP", net->proc_net);<br>
> if (!cn->procdir) {<!-- --><br>
> pr_err("Unable to proc dir entry\n");<br>
> return -ENOMEM;<br>
> diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c<br>
> index 869aa9c..2032221 100644<br>
> --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c<br>
> +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c<br>
> @@ -418,17 +418,17 @@ static int __net_init ip_conntrack_net_init(struct net *net)<br>
> {<!-- --><br>
> struct proc_dir_entry *proc, *proc_exp, *proc_stat;<br>
> <br>
> - proc = proc_create("ip_conntrack", 0440, net->proc_net, &ct_file_ops);<br>
> + proc = proc_net_create("ip_conntrack", 0440, net->proc_net, &ct_file_ops);<br>
> if (!proc)<br>
> goto err1;<br>
> <br>
> - proc_exp = proc_create("ip_conntrack_expect", 0440, net->proc_net,<br>
> + proc_exp = proc_net_create("ip_conntrack_expect", 0440, net->proc_net,<br>
> &ip_exp_file_ops);<br>
> if (!proc_exp)<br>
> goto err2;<br>
> <br>
> - proc_stat = proc_net_create_data("ip_conntrack", S_IRUGO,<br>
> - net->proc_net_stat, &ct_cpu_seq_fops, NULL);<br>
> + proc_stat = proc_net_create("ip_conntrack", S_IRUGO,<br>
> + net->proc_net_stat, &ct_cpu_seq_fops);<br>
> if (!proc_stat)<br>
> goto err3;<br>
> return 0;<br>
> diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c<br>
> index 0d81d31..eefa838 100644<br>
> --- a/net/ipv4/ping.c<br>
> +++ b/net/ipv4/ping.c<br>
> @@ -898,7 +898,7 @@ static int ping_proc_register(struct net *net)<br>
> struct proc_dir_entry *p;<br>
> int rc = 0;<br>
> <br>
> - p = proc_create("icmp", S_IRUGO, net->proc_net, &ping_seq_fops);<br>
> + p = proc_net_create("icmp", S_IRUGO, net->proc_net, &ping_seq_fops);<br>
> if (!p)<br>
> rc = -ENOMEM;<br>
> return rc;<br>
> diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c<br>
> index 87665be..1c8f3a5 100644<br>
> --- a/net/ipv4/proc.c<br>
> +++ b/net/ipv4/proc.c<br>
> @@ -501,12 +501,12 @@ static const struct file_operations netstat_seq_fops = {<!-- --><br>
> <br>
> static __net_init int ip_proc_init_net(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("sockstat", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("sockstat", S_IRUGO, net->proc_net,<br>
> &sockstat_seq_fops))<br>
> goto out_sockstat;<br>
> - if (!proc_create("netstat", S_IRUGO, net->proc_net, &netstat_seq_fops))<br>
> + if (!proc_net_create("netstat", S_IRUGO, net->proc_net, &netstat_seq_fops))<br>
> goto out_netstat;<br>
> - if (!proc_create("snmp", S_IRUGO, net->proc_net, &snmp_seq_fops))<br>
> + if (!proc_net_create("snmp", S_IRUGO, net->proc_net, &snmp_seq_fops))<br>
> goto out_snmp;<br>
> <br>
> return 0;<br>
> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c<br>
> index 3a38afd..d5d3290 100644<br>
> --- a/net/ipv4/raw.c<br>
> +++ b/net/ipv4/raw.c<br>
> @@ -1051,7 +1051,7 @@ static const struct file_operations raw_seq_fops = {<!-- --><br>
> <br>
> static __net_init int raw_init_net(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("raw", S_IRUGO, net->proc_net, &raw_seq_fops))<br>
> + if (!proc_net_create("raw", S_IRUGO, net->proc_net, &raw_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> return 0;<br>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c<br>
> index 6b7313f..f72fd17 100644<br>
> --- a/net/ipv4/route.c<br>
> +++ b/net/ipv4/route.c<br>
> @@ -385,19 +385,19 @@ static int __net_init ip_rt_do_proc_init(struct net *net)<br>
> {<!-- --><br>
> struct proc_dir_entry *pde;<br>
> <br>
> - pde = proc_create("rt_cache", S_IRUGO, net->proc_net,<br>
> + pde = proc_net_create("rt_cache", S_IRUGO, net->proc_net,<br>
> &rt_cache_seq_fops);<br>
> if (!pde)<br>
> goto err1;<br>
> <br>
> - pde = proc_net_create_data("rt_cache", S_IRUGO,<br>
> - net->proc_net_stat, &rt_cpu_seq_fops, NULL);<br>
> + pde = proc_net_create("rt_cache", S_IRUGO,<br>
> + net->proc_net_stat, &rt_cpu_seq_fops);<br>
> if (!pde)<br>
> goto err2;<br>
> <br>
> #ifdef CONFIG_IP_ROUTE_CLASSID<br>
> - pde = proc_net_create_data("rt_acct", 0,<br>
> - net->proc_net, &rt_acct_proc_fops, NULL);<br>
> + pde = proc_net_create("rt_acct", 0,<br>
> + net->proc_net, &rt_acct_proc_fops);<br>
> if (!pde)<br>
> goto err3;<br>
> #endif<br>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c<br>
> index 8d510e2..f5c27ae 100644<br>
> --- a/net/ipv6/addrconf.c<br>
> +++ b/net/ipv6/addrconf.c<br>
> @@ -3562,7 +3562,7 @@ static const struct file_operations if6_fops = {<!-- --><br>
> <br>
> static int __net_init if6_proc_net_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("if_inet6", S_IRUGO, net->proc_net, &if6_fops))<br>
> + if (!proc_net_create("if_inet6", S_IRUGO, net->proc_net, &if6_fops))<br>
> return -ENOMEM;<br>
> return 0;<br>
> }<br>
> diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c<br>
> index b0f207a..71db4fa 100644<br>
> --- a/net/ipv6/anycast.c<br>
> +++ b/net/ipv6/anycast.c<br>
> @@ -500,7 +500,7 @@ static const struct file_operations ac6_seq_fops = {<!-- --><br>
> <br>
> int __net_init ac6_proc_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("anycast6", S_IRUGO, net->proc_net, &ac6_seq_fops))<br>
> + if (!proc_net_create("anycast6", S_IRUGO, net->proc_net, &ac6_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> return 0;<br>
> diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c<br>
> index 9793548..27c83c7 100644<br>
> --- a/net/ipv6/ip6_flowlabel.c<br>
> +++ b/net/ipv6/ip6_flowlabel.c<br>
> @@ -780,7 +780,7 @@ static const struct file_operations ip6fl_seq_fops = {<!-- --><br>
> <br>
> static int __net_init ip6_flowlabel_proc_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("ip6_flowlabel", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("ip6_flowlabel", S_IRUGO, net->proc_net,<br>
> &ip6fl_seq_fops))<br>
> return -ENOMEM;<br>
> return 0;<br>
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c<br>
> index e51ddb9..a32e45b 100644<br>
> --- a/net/ipv6/ip6mr.c<br>
> +++ b/net/ipv6/ip6mr.c<br>
> @@ -1367,9 +1367,9 @@ static int __net_init ip6mr_net_init(struct net *net)<br>
> <br>
> #ifdef CONFIG_PROC_FS<br>
> err = -ENOMEM;<br>
> - if (!proc_create("ip6_mr_vif", 0, net->proc_net, &ip6mr_vif_fops))<br>
> + if (!proc_net_create("ip6_mr_vif", 0, net->proc_net, &ip6mr_vif_fops))<br>
> goto proc_vif_fail;<br>
> - if (!proc_create("ip6_mr_cache", 0, net->proc_net, &ip6mr_mfc_fops))<br>
> + if (!proc_net_create("ip6_mr_cache", 0, net->proc_net, &ip6mr_mfc_fops))<br>
> goto proc_cache_fail;<br>
> #endif<br>
> <br>
> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c<br>
> index b998bd3..f69452f 100644<br>
> --- a/net/ipv6/mcast.c<br>
> +++ b/net/ipv6/mcast.c<br>
> @@ -2877,9 +2877,9 @@ static int __net_init igmp6_proc_init(struct net *net)<br>
> int err;<br>
> <br>
> err = -ENOMEM;<br>
> - if (!proc_create("igmp6", S_IRUGO, net->proc_net, &igmp6_mc_seq_fops))<br>
> + if (!proc_net_create("igmp6", S_IRUGO, net->proc_net, &igmp6_mc_seq_fops))<br>
> goto out;<br>
> - if (!proc_create("mcfilter6", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("mcfilter6", S_IRUGO, net->proc_net,<br>
> &igmp6_mcf_seq_fops))<br>
> goto out_proc_net_igmp6;<br>
> <br>
> diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c<br>
> index 3393f01..09119b1 100644<br>
> --- a/net/ipv6/proc.c<br>
> +++ b/net/ipv6/proc.c<br>
> @@ -302,11 +302,11 @@ int snmp6_unregister_dev(struct inet6_dev *idev)<br>
> <br>
> static int __net_init ipv6_proc_init_net(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("sockstat6", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("sockstat6", S_IRUGO, net->proc_net,<br>
> &sockstat6_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> - if (!proc_create("snmp6", S_IRUGO, net->proc_net, &snmp6_seq_fops))<br>
> + if (!proc_net_create("snmp6", S_IRUGO, net->proc_net, &snmp6_seq_fops))<br>
> goto proc_snmp6_fail;<br>
> <br>
> net->mib.proc_net_devsnmp6 = proc_net_mkdir(net, "dev_snmp6", net->proc_net);<br>
> diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c<br>
> index 2b00540..722cfcb 100644<br>
> --- a/net/ipv6/raw.c<br>
> +++ b/net/ipv6/raw.c<br>
> @@ -1280,7 +1280,7 @@ static const struct file_operations raw6_seq_fops = {<!-- --><br>
> <br>
> static int __net_init raw6_init_net(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("raw6", S_IRUGO, net->proc_net, &raw6_seq_fops))<br>
> + if (!proc_net_create("raw6", S_IRUGO, net->proc_net, &raw6_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> return 0;<br>
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c<br>
> index fa0e036..c7264cb 100644<br>
> --- a/net/ipv6/route.c<br>
> +++ b/net/ipv6/route.c<br>
> @@ -3493,8 +3493,8 @@ static void __net_exit ip6_route_net_exit(struct net *net)<br>
> static int __net_init ip6_route_net_init_late(struct net *net)<br>
> {<!-- --><br>
> #ifdef CONFIG_PROC_FS<br>
> - proc_create("ipv6_route", 0, net->proc_net, &ipv6_route_proc_fops);<br>
> - proc_create("rt6_stats", S_IRUGO, net->proc_net, &rt6_stats_seq_fops);<br>
> + proc_net_create("ipv6_route", 0, net->proc_net, &ipv6_route_proc_fops);<br>
> + proc_net_create("rt6_stats", S_IRUGO, net->proc_net, &rt6_stats_seq_fops);<br>
> #endif<br>
> return 0;<br>
> }<br>
> diff --git a/net/key/af_key.c b/net/key/af_key.c<br>
> index 00bca84..69917d5 100644<br>
> --- a/net/key/af_key.c<br>
> +++ b/net/key/af_key.c<br>
> @@ -3779,7 +3779,7 @@ static int __net_init pfkey_init_proc(struct net *net)<br>
> {<!-- --><br>
> struct proc_dir_entry *e;<br>
> <br>
> - e = proc_create("pfkey", 0, net->proc_net, &pfkey_proc_ops);<br>
> + e = proc_net_create("pfkey", 0, net->proc_net, &pfkey_proc_ops);<br>
> if (e == NULL)<br>
> return -ENOMEM;<br>
> <br>
> diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c<br>
> index a819c36..84b1675 100644<br>
> --- a/net/l2tp/l2tp_ppp.c<br>
> +++ b/net/l2tp/l2tp_ppp.c<br>
> @@ -1751,7 +1751,7 @@ static __net_init int pppol2tp_init_net(struct net *net)<br>
> struct proc_dir_entry *pde;<br>
> int err = 0;<br>
> <br>
> - pde = proc_create("pppol2tp", S_IRUGO, net->proc_net,<br>
> + pde = proc_net_create("pppol2tp", S_IRUGO, net->proc_net,<br>
> &pppol2tp_proc_fops);<br>
> if (!pde) {<!-- --><br>
> err = -ENOMEM;<br>
> diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c<br>
> index dfd7b65..09cae1c 100644<br>
> --- a/net/netfilter/ipvs/ip_vs_app.c<br>
> +++ b/net/netfilter/ipvs/ip_vs_app.c<br>
> @@ -616,7 +616,7 @@ int __net_init ip_vs_app_net_init(struct net *net)<br>
> struct netns_ipvs *ipvs = net_ipvs(net);<br>
> <br>
> INIT_LIST_HEAD(&ipvs->app_list);<br>
> - proc_create("ip_vs_app", 0, net->proc_net, &ip_vs_app_fops);<br>
> + proc_net_create("ip_vs_app", 0, net->proc_net, &ip_vs_app_fops);<br>
> return 0;<br>
> }<br>
> <br>
> diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c<br>
> index 5ae635a..8250f1d 100644<br>
> --- a/net/netfilter/ipvs/ip_vs_conn.c<br>
> +++ b/net/netfilter/ipvs/ip_vs_conn.c<br>
> @@ -1305,8 +1305,8 @@ int __net_init ip_vs_conn_net_init(struct net *net)<br>
> <br>
> atomic_set(&ipvs->conn_count, 0);<br>
> <br>
> - proc_create("ip_vs_conn", 0, net->proc_net, &ip_vs_conn_fops);<br>
> - proc_create("ip_vs_conn_sync", 0, net->proc_net, &ip_vs_conn_sync_fops);<br>
> + proc_net_create("ip_vs_conn", 0, net->proc_net, &ip_vs_conn_fops);<br>
> + proc_net_create("ip_vs_conn_sync", 0, net->proc_net, &ip_vs_conn_sync_fops);<br>
> return 0;<br>
> }<br>
> <br>
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c<br>
> index c8e0505..1d21a4b 100644<br>
> --- a/net/netfilter/ipvs/ip_vs_ctl.c<br>
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c<br>
> @@ -3829,9 +3829,9 @@ int __net_init ip_vs_control_net_init(struct net *net)<br>
> <br>
> spin_lock_init(&ipvs->tot_stats.lock);<br>
> <br>
> - proc_create("ip_vs", 0, net->proc_net, &ip_vs_info_fops);<br>
> - proc_create("ip_vs_stats", 0, net->proc_net, &ip_vs_stats_fops);<br>
> - proc_create("ip_vs_stats_percpu", 0, net->proc_net,<br>
> + proc_net_create("ip_vs", 0, net->proc_net, &ip_vs_info_fops);<br>
> + proc_net_create("ip_vs_stats", 0, net->proc_net, &ip_vs_stats_fops);<br>
> + proc_net_create("ip_vs_stats_percpu", 0, net->proc_net,<br>
> &ip_vs_stats_percpu_fops);<br>
> <br>
> if (ip_vs_control_net_init_sysctl(net))<br>
> diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c<br>
> index 37b8b33..d72a719 100644<br>
> --- a/net/netfilter/nf_conntrack_expect.c<br>
> +++ b/net/netfilter/nf_conntrack_expect.c<br>
> @@ -595,7 +595,7 @@ static int exp_proc_init(struct net *net)<br>
> #ifdef CONFIG_NF_CONNTRACK_PROCFS<br>
> struct proc_dir_entry *proc;<br>
> <br>
> - proc = proc_create("nf_conntrack_expect", 0440, net->proc_net,<br>
> + proc = proc_net_create("nf_conntrack_expect", 0440, net->proc_net,<br>
> &exp_file_ops);<br>
> if (!proc)<br>
> return -ENOMEM;<br>
> diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c<br>
> index 871e6ff..6c4955f 100644<br>
> --- a/net/netfilter/nf_conntrack_standalone.c<br>
> +++ b/net/netfilter/nf_conntrack_standalone.c<br>
> @@ -403,12 +403,12 @@ static int nf_conntrack_standalone_init_proc(struct net *net)<br>
> {<!-- --><br>
> struct proc_dir_entry *pde;<br>
> <br>
> - pde = proc_create("nf_conntrack", 0440, net->proc_net, &ct_file_ops);<br>
> + pde = proc_net_create("nf_conntrack", 0440, net->proc_net, &ct_file_ops);<br>
> if (!pde)<br>
> goto out_nf_conntrack;<br>
> <br>
> - pde = proc_net_create_data("nf_conntrack", S_IRUGO, net->proc_net_stat,<br>
> - &ct_cpu_seq_fops, NULL);<br>
> + pde = proc_net_create("nf_conntrack", S_IRUGO, net->proc_net_stat,<br>
> + &ct_cpu_seq_fops);<br>
> if (!pde)<br>
> goto out_stat_nf_conntrack;<br>
> return 0;<br>
> diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c<br>
> index 8d69ddd..49764d7 100644<br>
> --- a/net/netfilter/nf_synproxy_core.c<br>
> +++ b/net/netfilter/nf_synproxy_core.c<br>
> @@ -325,7 +325,7 @@ static const struct file_operations synproxy_cpu_seq_fops = {<!-- --><br>
> <br>
> static int __net_init synproxy_proc_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("synproxy", S_IRUGO, net->proc_net_stat,<br>
> + if (!proc_net_create("synproxy", S_IRUGO, net->proc_net_stat,<br>
> &synproxy_cpu_seq_fops))<br>
> return -ENOMEM;<br>
> return 0;<br>
> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c<br>
> index 1a395b2..b343e40 100644<br>
> --- a/net/netlink/af_netlink.c<br>
> +++ b/net/netlink/af_netlink.c<br>
> @@ -3218,7 +3218,7 @@ static const struct net_proto_family netlink_family_ops = {<!-- --><br>
> static int __net_init netlink_net_init(struct net *net)<br>
> {<!-- --><br>
> #ifdef CONFIG_PROC_FS<br>
> - if (!proc_create("netlink", 0, net->proc_net, &netlink_seq_fops))<br>
> + if (!proc_net_create("netlink", 0, net->proc_net, &netlink_seq_fops))<br>
> return -ENOMEM;<br>
> #endif<br>
> return 0;<br>
> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c<br>
> index 8214b9f..517f5a1 100644<br>
> --- a/net/packet/af_packet.c<br>
> +++ b/net/packet/af_packet.c<br>
> @@ -4159,7 +4159,7 @@ static int __net_init packet_net_init(struct net *net)<br>
> mutex_init(&net->packet.sklist_lock);<br>
> INIT_HLIST_HEAD(&net->packet.sklist);<br>
> <br>
> - if (!proc_create("packet", 0, net->proc_net, &packet_seq_fops))<br>
> + if (!proc_net_create("packet", 0, net->proc_net, &packet_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> return 0;<br>
> diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c<br>
> index b71c25b..f2e5dbb 100644<br>
> --- a/net/phonet/pn_dev.c<br>
> +++ b/net/phonet/pn_dev.c<br>
> @@ -320,7 +320,7 @@ static int __net_init phonet_init_net(struct net *net)<br>
> {<!-- --><br>
> struct phonet_net *pnn = phonet_pernet(net);<br>
> <br>
> - if (!proc_create("phonet", 0, net->proc_net, &pn_sock_seq_fops))<br>
> + if (!proc_net_create("phonet", 0, net->proc_net, &pn_sock_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> INIT_LIST_HEAD(&pnn->pndevs.list);<br>
> diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c<br>
> index d72b992..3043af5 100644<br>
> --- a/net/sched/sch_api.c<br>
> +++ b/net/sched/sch_api.c<br>
> @@ -1872,7 +1872,7 @@ static int __net_init psched_net_init(struct net *net)<br>
> {<!-- --><br>
> struct proc_dir_entry *e;<br>
> <br>
> - e = proc_create("psched", 0, net->proc_net, &psched_fops);<br>
> + e = proc_net_create("psched", 0, net->proc_net, &psched_fops);<br>
> if (e == NULL)<br>
> return -ENOMEM;<br>
> <br>
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c<br>
> index 6699df7..a157cce 100644<br>
> --- a/net/unix/af_unix.c<br>
> +++ b/net/unix/af_unix.c<br>
> @@ -2882,7 +2882,7 @@ static int __net_init unix_net_init(struct net *net)<br>
> goto out;<br>
> <br>
> #ifdef CONFIG_PROC_FS<br>
> - if (!proc_create("unix", 0, net->proc_net, &unix_seq_fops)) {<!-- --><br>
> + if (!proc_net_create("unix", 0, net->proc_net, &unix_seq_fops)) {<!-- --><br>
> unix_sysctl_unregister(net);<br>
> goto out;<br>
> }<br>
> diff --git a/net/wireless/wext-proc.c b/net/wireless/wext-proc.c<br>
> index e98a01c..9af0f85 100644<br>
> --- a/net/wireless/wext-proc.c<br>
> +++ b/net/wireless/wext-proc.c<br>
> @@ -143,7 +143,7 @@ static const struct file_operations wireless_seq_fops = {<!-- --><br>
> int __net_init wext_proc_init(struct net *net)<br>
> {<!-- --><br>
> /* Create /proc/net/wireless entry */<br>
> - if (!proc_create("wireless", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("wireless", S_IRUGO, net->proc_net,<br>
> &wireless_seq_fops))<br>
> return -ENOMEM;<br>
> <br>
> diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c<br>
> index c721b0d..2abc64a 100644<br>
> --- a/net/xfrm/xfrm_proc.c<br>
> +++ b/net/xfrm/xfrm_proc.c<br>
> @@ -74,7 +74,7 @@ static const struct file_operations xfrm_statistics_seq_fops = {<!-- --><br>
> <br>
> int __net_init xfrm_proc_init(struct net *net)<br>
> {<!-- --><br>
> - if (!proc_create("xfrm_stat", S_IRUGO, net->proc_net,<br>
> + if (!proc_net_create("xfrm_stat", S_IRUGO, net->proc_net,<br>
> &xfrm_statistics_seq_fops))<br>
> return -ENOMEM;<br>
> return 0;<br>
> <br>
> _______________________________________________<br>
> Devel mailing list<br>
> Devel@openvz.org<br>
> <a href="https://lists.openvz.org/mailman/listinfo/devel">https://lists.openvz.org/mailman/listinfo/devel</a><br>
</div>
</span></font></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>