From: Wang Chen Date: Thu, 28 Feb 2008 22:14:25 +0000 (-0800) Subject: [IPV4]: Use proc_create() to setup ->proc_fops first X-Git-Tag: v2.6.25-rc4~148^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=770207208e4374f013f6f49233d5c8c8df505e03;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 525787b52b..7b5e8e1d94 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);