aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-02-28 17:14:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-28 17:14:25 -0500
commit770207208e4374f013f6f49233d5c8c8df505e03 (patch)
tree542a5b947a56f0f8375c88f19e5f60a9a5cd78a8 /net/ipv4/route.c
parent4436f4cbfac15acea139863e322ed2f9efb118d3 (diff)
[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.c5
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)
542 if (!pde) 542 if (!pde)
543 goto err1; 543 goto err1;
544 544
545 pde = create_proc_entry("rt_cache", S_IRUGO, net->proc_net_stat); 545 pde = proc_create("rt_cache", S_IRUGO,
546 net->proc_net_stat, &rt_cpu_seq_fops);
546 if (!pde) 547 if (!pde)
547 goto err2; 548 goto err2;
548 549
549 pde->proc_fops = &rt_cpu_seq_fops;
550
551#ifdef CONFIG_NET_CLS_ROUTE 550#ifdef CONFIG_NET_CLS_ROUTE
552 pde = create_proc_read_entry("rt_acct", 0, net->proc_net, 551 pde = create_proc_read_entry("rt_acct", 0, net->proc_net,
553 ip_rt_acct_read, NULL); 552 ip_rt_acct_read, NULL);