diff options
author | Denis V. Lunev <den@openvz.org> | 2008-05-02 05:46:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-02 05:46:22 -0400 |
commit | 5efdccbcda20d3e5fbaa85f726dcc9cfeb005577 (patch) | |
tree | 7b61603bf422064b69586853093af194009bd231 /net/core/neighbour.c | |
parent | 6e79d85d9a6b7a149dd3666b079c96cfbf57fdb8 (diff) |
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>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 75075c303c44..5d9d7130bd6e 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1430,11 +1430,10 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) | |||
1430 | panic("cannot create neighbour cache statistics"); | 1430 | panic("cannot create neighbour cache statistics"); |
1431 | 1431 | ||
1432 | #ifdef CONFIG_PROC_FS | 1432 | #ifdef CONFIG_PROC_FS |
1433 | tbl->pde = proc_create(tbl->id, 0, init_net.proc_net_stat, | 1433 | tbl->pde = proc_create_data(tbl->id, 0, init_net.proc_net_stat, |
1434 | &neigh_stat_seq_fops); | 1434 | &neigh_stat_seq_fops, tbl); |
1435 | if (!tbl->pde) | 1435 | if (!tbl->pde) |
1436 | panic("cannot create neighbour proc dir entry"); | 1436 | panic("cannot create neighbour proc dir entry"); |
1437 | tbl->pde->data = tbl; | ||
1438 | #endif | 1437 | #endif |
1439 | 1438 | ||
1440 | tbl->hash_mask = 1; | 1439 | tbl->hash_mask = 1; |