* [PATCH 11/15] [IPV6]: Use proc_create() to setup ->proc_fops first
@ 2008-02-28 10:57 Wang Chen
2008-02-28 22:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wang Chen @ 2008-02-28 10:57 UTC (permalink / raw)
To: David S. Miller, NETDEV
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>
---
net/ipv6/proc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 35e502a..199ef37 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;
--
WCN
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 11/15] [IPV6]: Use proc_create() to setup ->proc_fops first
2008-02-28 10:57 [PATCH 11/15] [IPV6]: Use proc_create() to setup ->proc_fops first Wang Chen
@ 2008-02-28 22:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-02-28 22:14 UTC (permalink / raw)
To: wangchen; +Cc: netdev
From: Wang Chen <wangchen@cn.fujitsu.com>
Date: Thu, 28 Feb 2008 18:57:49 +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>
Applied.
> @@ -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;
->data visibility issue
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-28 22:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 10:57 [PATCH 11/15] [IPV6]: Use proc_create() to setup ->proc_fops first Wang Chen
2008-02-28 22:14 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).