diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-02-18 01:34:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-18 14:53:08 -0500 |
commit | d4beaa66add8aebf83ab16d2fde4e4de8dac36df (patch) | |
tree | 87e69803c16904077d04c212d7b58acbfa62d143 /net/core | |
parent | 510a1e7249298f6bbd049e1ec98041ddf5ef6452 (diff) | |
download | linux-d4beaa66add8aebf83ab16d2fde4e4de8dac36df.tar.bz2 |
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/core')
-rw-r--r-- | net/core/dev.c | 7 | ||||
-rw-r--r-- | net/core/dev_addr_lists.c | 2 | ||||
-rw-r--r-- | net/core/sock.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 1932d351ed7c..f2f81ef5bbd6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4518,11 +4518,12 @@ static int __net_init dev_proc_net_init(struct net *net) { int rc = -ENOMEM; - if (!proc_net_fops_create(net, "dev", S_IRUGO, &dev_seq_fops)) + if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops)) goto out; - if (!proc_net_fops_create(net, "softnet_stat", S_IRUGO, &softnet_seq_fops)) + if (!proc_create("softnet_stat", S_IRUGO, net->proc_net, + &softnet_seq_fops)) goto out_dev; - if (!proc_net_fops_create(net, "ptype", S_IRUGO, &ptype_seq_fops)) + if (!proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops)) goto out_softnet; if (wext_proc_init(net)) diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index b079c7bbc157..7c62ec449f3c 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c @@ -780,7 +780,7 @@ static const struct file_operations dev_mc_seq_fops = { static int __net_init dev_mc_net_init(struct net *net) { - if (!proc_net_fops_create(net, "dev_mcast", 0, &dev_mc_seq_fops)) + if (!proc_create("dev_mcast", 0, net->proc_net, &dev_mc_seq_fops)) return -ENOMEM; return 0; } diff --git a/net/core/sock.c b/net/core/sock.c index f1e14e20d181..b4d562ef36fb 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -2836,7 +2836,7 @@ static const struct file_operations proto_seq_fops = { static __net_init int proto_init_net(struct net *net) { - if (!proc_net_fops_create(net, "protocols", S_IRUGO, &proto_seq_fops)) + if (!proc_create("protocols", S_IRUGO, net->proc_net, &proto_seq_fops)) return -ENOMEM; return 0; |