Skip to contentSkip to conversation

: Use proc_create() to setup ->proc_fops first

PATCH Applied Wang Chen 2 participants 2 messages Feb 28, 2008

Subsystems (2)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 8/15 : 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.

---
 net/core/neighbour.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/core/neighbour.c +2 -2
index 2328acb..aef0153 100644
@@ -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
 
Signature · 1 line
WCN