diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-02-17 20:34:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-18 14:53:08 -0500 |
commit | d4beaa66add8aebf83ab16d2fde4e4de8dac36df (patch) | |
tree | 87e69803c16904077d04c212d7b58acbfa62d143 /net/netfilter | |
parent | 510a1e7249298f6bbd049e1ec98041ddf5ef6452 (diff) |
net: proc: change proc_net_fops_create to proc_create
Right now, some modules such as bonding use proc_create
to create proc entries under /proc/net/, and other modules
such as ipv4 use proc_net_fops_create.
It looks a little chaos.this patch changes all of
proc_net_fops_create to proc_create. we can remove
proc_net_fops_create 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/netfilter')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_app.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 8 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index 9713e6e86d47..1db8a25fe4ba 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c | |||
@@ -605,7 +605,7 @@ int __net_init ip_vs_app_net_init(struct net *net) | |||
605 | struct netns_ipvs *ipvs = net_ipvs(net); | 605 | struct netns_ipvs *ipvs = net_ipvs(net); |
606 | 606 | ||
607 | INIT_LIST_HEAD(&ipvs->app_list); | 607 | INIT_LIST_HEAD(&ipvs->app_list); |
608 | proc_net_fops_create(net, "ip_vs_app", 0, &ip_vs_app_fops); | 608 | proc_create("ip_vs_app", 0, net->proc_net, &ip_vs_app_fops); |
609 | return 0; | 609 | return 0; |
610 | } | 610 | } |
611 | 611 | ||
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 68e368a4beed..91ae11280c24 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -1291,8 +1291,8 @@ int __net_init ip_vs_conn_net_init(struct net *net) | |||
1291 | 1291 | ||
1292 | atomic_set(&ipvs->conn_count, 0); | 1292 | atomic_set(&ipvs->conn_count, 0); |
1293 | 1293 | ||
1294 | proc_net_fops_create(net, "ip_vs_conn", 0, &ip_vs_conn_fops); | 1294 | proc_create("ip_vs_conn", 0, net->proc_net, &ip_vs_conn_fops); |
1295 | proc_net_fops_create(net, "ip_vs_conn_sync", 0, &ip_vs_conn_sync_fops); | 1295 | proc_create("ip_vs_conn_sync", 0, net->proc_net, &ip_vs_conn_sync_fops); |
1296 | return 0; | 1296 | return 0; |
1297 | } | 1297 | } |
1298 | 1298 | ||
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index ec664cbb119f..7d69181f8daa 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -3800,10 +3800,10 @@ int __net_init ip_vs_control_net_init(struct net *net) | |||
3800 | 3800 | ||
3801 | spin_lock_init(&ipvs->tot_stats.lock); | 3801 | spin_lock_init(&ipvs->tot_stats.lock); |
3802 | 3802 | ||
3803 | proc_net_fops_create(net, "ip_vs", 0, &ip_vs_info_fops); | 3803 | proc_create("ip_vs", 0, net->proc_net, &ip_vs_info_fops); |
3804 | proc_net_fops_create(net, "ip_vs_stats", 0, &ip_vs_stats_fops); | 3804 | proc_create("ip_vs_stats", 0, net->proc_net, &ip_vs_stats_fops); |
3805 | proc_net_fops_create(net, "ip_vs_stats_percpu", 0, | 3805 | proc_create("ip_vs_stats_percpu", 0, net->proc_net, |
3806 | &ip_vs_stats_percpu_fops); | 3806 | &ip_vs_stats_percpu_fops); |
3807 | 3807 | ||
3808 | if (ip_vs_control_net_init_sysctl(net)) | 3808 | if (ip_vs_control_net_init_sysctl(net)) |
3809 | goto err; | 3809 | goto err; |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index bdd341899ed3..4c15f8d0b741 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -571,7 +571,8 @@ static int exp_proc_init(struct net *net) | |||
571 | #ifdef CONFIG_NF_CONNTRACK_PROCFS | 571 | #ifdef CONFIG_NF_CONNTRACK_PROCFS |
572 | struct proc_dir_entry *proc; | 572 | struct proc_dir_entry *proc; |
573 | 573 | ||
574 | proc = proc_net_fops_create(net, "nf_conntrack_expect", 0440, &exp_file_ops); | 574 | proc = proc_create("nf_conntrack_expect", 0440, net->proc_net, |
575 | &exp_file_ops); | ||
575 | if (!proc) | 576 | if (!proc) |
576 | return -ENOMEM; | 577 | return -ENOMEM; |
577 | #endif /* CONFIG_NF_CONNTRACK_PROCFS */ | 578 | #endif /* CONFIG_NF_CONNTRACK_PROCFS */ |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 7936bf7f90ba..bee9aecc7ba7 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -366,7 +366,7 @@ static int nf_conntrack_standalone_init_proc(struct net *net) | |||
366 | { | 366 | { |
367 | struct proc_dir_entry *pde; | 367 | struct proc_dir_entry *pde; |
368 | 368 | ||
369 | pde = proc_net_fops_create(net, "nf_conntrack", 0440, &ct_file_ops); | 369 | pde = proc_create("nf_conntrack", 0440, net->proc_net, &ct_file_ops); |
370 | if (!pde) | 370 | if (!pde) |
371 | goto out_nf_conntrack; | 371 | goto out_nf_conntrack; |
372 | 372 | ||