]> err.no Git - linux-2.6/commitdiff
[IPV6]: Use proc_create() to setup ->proc_fops first
authorWang Chen <wangchen@cn.fujitsu.com>
Thu, 28 Feb 2008 22:13:46 +0000 (14:13 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Feb 2008 22:13:46 +0000 (14:13 -0800)
Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/proc.c

index 35e502a72495f97efc72c7f386e25ca9d53f95e0..199ef379e5017e10d1e1da74cfb0d865e8266f1c 100644 (file)
@@ -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;