From: Wang Chen Date: Thu, 28 Feb 2008 22:10:51 +0000 (-0800) Subject: [NEIGHBOUR]: Use proc_create() to setup ->proc_fops first X-Git-Tag: v2.6.25-rc4~148^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46ecf0b994715589b9f5f620beca4d6aaaa02028;p=linux-2.6 [NEIGHBOUR]: 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/core/neighbour.c b/net/core/neighbour.c index 2328acbd16..aef01533df 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1389,10 +1389,10 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) panic("cannot create neighbour cache statistics"); #ifdef CONFIG_PROC_FS - tbl->pde = create_proc_entry(tbl->id, 0, init_net.proc_net_stat); + tbl->pde = proc_create(tbl->id, 0, init_net.proc_net_stat, + &neigh_stat_seq_fops); if (!tbl->pde) panic("cannot create neighbour proc dir entry"); - tbl->pde->proc_fops = &neigh_stat_seq_fops; tbl->pde->data = tbl; #endif