From: Wang Chen Date: Thu, 28 Feb 2008 22:13:46 +0000 (-0800) Subject: [IPV6]: Use proc_create() to setup ->proc_fops first X-Git-Tag: v2.6.25-rc4~148^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4436f4cbfac15acea139863e322ed2f9efb118d3;p=linux-2.6 [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: Wang Chen Signed-off-by: David S. Miller --- diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 35e502a724..199ef379e5 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -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;