netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 12/15] [IPV4]: Use proc_create() to setup ->proc_fops first
@ 2008-02-28 10:58 Wang Chen
  2008-02-28 22:14 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Chen @ 2008-02-28 10:58 UTC (permalink / raw)
  To: David S. Miller, NETDEV

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>
---
 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 525787b..7b5e8e1 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);
-- 
WCN



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-28 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 10:58 [PATCH 12/15] [IPV4]: Use proc_create() to setup ->proc_fops first Wang Chen
2008-02-28 22:14 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).