diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-02-28 14:14:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-28 14:14:25 -0800 |
commit | 770207208e4374f013f6f49233d5c8c8df505e03 (patch) | |
tree | 542a5b947a56f0f8375c88f19e5f60a9a5cd78a8 /net/ipv4/route.c | |
parent | 4436f4cbfac15acea139863e322ed2f9efb118d3 (diff) | |
download | linux-stable-770207208e4374f013f6f49233d5c8c8df505e03.tar.gz linux-stable-770207208e4374f013f6f49233d5c8c8df505e03.tar.bz2 linux-stable-770207208e4374f013f6f49233d5c8c8df505e03.zip |
[IPV4]: Use proc_create() to setup ->proc_fops first
Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 525787b52b72..7b5e8e1d94be 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -542,12 +542,11 @@ static __init int ip_rt_proc_init(struct net *net) if (!pde) goto err1; - pde = create_proc_entry("rt_cache", S_IRUGO, net->proc_net_stat); + pde = proc_create("rt_cache", S_IRUGO, + net->proc_net_stat, &rt_cpu_seq_fops); if (!pde) goto err2; - pde->proc_fops = &rt_cpu_seq_fops; - #ifdef CONFIG_NET_CLS_ROUTE pde = create_proc_read_entry("rt_acct", 0, net->proc_net, ip_rt_acct_read, NULL); |