Skip to content

Commit

Permalink
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Chen authored and David S. Miller committed Feb 28, 2008
1 parent 7e02180 commit 46ecf0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 46ecf0b

Please sign in to comment.