aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/proc.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-02-28 17:13:46 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-28 17:13:46 -0500
commit4436f4cbfac15acea139863e322ed2f9efb118d3 (patch)
tree89be855725f3120513bb0ed74a9608a1ab3b5ed1 /net/ipv6/proc.c
parent160f17e345f5b50484d6cdc985b8686a05bf015d (diff)
[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 <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/proc.c')
-rw-r--r--net/ipv6/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 35e502a72495..199ef379e501 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -217,12 +217,12 @@ int snmp6_register_dev(struct inet6_dev *idev)
217 if (!proc_net_devsnmp6) 217 if (!proc_net_devsnmp6)
218 return -ENOENT; 218 return -ENOENT;
219 219
220 p = create_proc_entry(idev->dev->name, S_IRUGO, proc_net_devsnmp6); 220 p = proc_create(idev->dev->name, S_IRUGO,
221 proc_net_devsnmp6, &snmp6_seq_fops);
221 if (!p) 222 if (!p)
222 return -ENOMEM; 223 return -ENOMEM;
223 224
224 p->data = idev; 225 p->data = idev;
225 p->proc_fops = &snmp6_seq_fops;
226 226
227 idev->stats.proc_dir_entry = p; 227 idev->stats.proc_dir_entry = p;
228 return 0; 228 return 0;