net: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.
Additionally, there is no need to assign NULL to PDE->data after creation,
/proc generic has already done this for us.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Denis V. Lunev
2008-05-02 02:46:22 -07:00
committed by David S. Miller
parent 6e79d85d9a
commit 5efdccbcda
2 changed files with 6 additions and 11 deletions

View File

@@ -1430,11 +1430,10 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
panic("cannot create neighbour cache statistics");
#ifdef CONFIG_PROC_FS
tbl->pde = proc_create(tbl->id, 0, init_net.proc_net_stat,
&neigh_stat_seq_fops);
tbl->pde = proc_create_data(tbl->id, 0, init_net.proc_net_stat,
&neigh_stat_seq_fops, tbl);
if (!tbl->pde)
panic("cannot create neighbour proc dir entry");
tbl->pde->data = tbl;
#endif
tbl->hash_mask = 1;