Commit 4436f4cb authored by Wang Chen's avatar Wang Chen Committed by David S. Miller
Browse files

[IPV6]: 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.
Signed-off-by: default avatarWang Chen <>
Signed-off-by: default avatarDavid S. Miller <>
parent 160f17e3
...@@ -217,12 +217,12 @@ int snmp6_register_dev(struct inet6_dev *idev) ...@@ -217,12 +217,12 @@ int snmp6_register_dev(struct inet6_dev *idev)
if (!proc_net_devsnmp6) if (!proc_net_devsnmp6)
return -ENOENT; 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) if (!p)
return -ENOMEM; return -ENOMEM;
p->data = idev; p->data = idev;
p->proc_fops = &snmp6_seq_fops;
idev->stats.proc_dir_entry = p; idev->stats.proc_dir_entry = p;
return 0; return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment