提交 0bb53a66 编写于 作者: D Denis V. Lunev 提交者: David S. Miller

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

Simply replace proc_create and further data assigned with proc_create_data.
Signed-off-by: NDenis V. Lunev <den@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5efdccbc
...@@ -247,13 +247,11 @@ int snmp6_register_dev(struct inet6_dev *idev) ...@@ -247,13 +247,11 @@ int snmp6_register_dev(struct inet6_dev *idev)
if (!proc_net_devsnmp6) if (!proc_net_devsnmp6)
return -ENOENT; return -ENOENT;
p = proc_create(idev->dev->name, S_IRUGO, p = proc_create_data(idev->dev->name, S_IRUGO,
proc_net_devsnmp6, &snmp6_seq_fops); proc_net_devsnmp6, &snmp6_seq_fops, idev);
if (!p) if (!p)
return -ENOMEM; return -ENOMEM;
p->data = idev;
idev->stats.proc_dir_entry = p; idev->stats.proc_dir_entry = p;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册