Skip to content

Commit

Permalink
[IPV6]: 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wang Chen authored and davem330 committed Feb 28, 2008
1 parent 160f17e commit 4436f4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ int snmp6_register_dev(struct inet6_dev *idev)
if (!proc_net_devsnmp6)
return -ENOENT;

p = create_proc_entry(idev->dev->name, S_IRUGO, proc_net_devsnmp6);
p = proc_create(idev->dev->name, S_IRUGO,
proc_net_devsnmp6, &snmp6_seq_fops);
if (!p)
return -ENOMEM;

p->data = idev;
p->proc_fops = &snmp6_seq_fops;

idev->stats.proc_dir_entry = p;
return 0;
Expand Down

0 comments on commit 4436f4c

Please sign in to comment.