]> err.no Git - linux-2.6/commitdiff
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
authorWang Chen <wangchen@cn.fujitsu.com>
Thu, 28 Feb 2008 22:10:51 +0000 (14:10 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Feb 2008 22:10:51 +0000 (14:10 -0800)
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>
net/core/neighbour.c

index 2328acbd16cdf1c87dd84c8e151cfc466126b256..aef01533dfb6ca2ed6dbc636ba58dc4ca490492d 100644 (file)
@@ -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