Skip to content

Commit

Permalink
ipv6: assign PDE->data before gluing PDE into /proc tree
Browse files Browse the repository at this point in the history
Simply replace proc_create and further data assigned with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed May 2, 2008
1 parent 5efdccb commit 0bb53a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/ipv6/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,11 @@ int snmp6_register_dev(struct inet6_dev *idev)
if (!proc_net_devsnmp6)
return -ENOENT;

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

p->data = idev;

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

0 comments on commit 0bb53a6

Please sign in to comment.