summaryrefslogtreecommitdiffstats
path: root/net/sctp/proc.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-02-28 23:13:16 +0100
committerDavid S. Miller <davem@davemloft.net>2008-02-28 23:13:16 +0100
commit160f17e345f5b50484d6cdc985b8686a05bf015d (patch)
tree3e455929c0b53b90ed08f123147ed52aa115c5bf /net/sctp/proc.c
parent[PKTGEN]: Use proc_create() to setup ->proc_fops first (diff)
downloadlinux-160f17e345f5b50484d6cdc985b8686a05bf015d.tar.xz
linux-160f17e345f5b50484d6cdc985b8686a05bf015d.zip
[SCTP]: 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/sctp/proc.c')
-rw-r--r--net/sctp/proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 69bb5a63fd8b..9e214da82d9e 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -108,12 +108,10 @@ int __init sctp_snmp_proc_init(void)
{
struct proc_dir_entry *p;
- p = create_proc_entry("snmp", S_IRUGO, proc_net_sctp);
+ p = proc_create("snmp", S_IRUGO, proc_net_sctp, &sctp_snmp_seq_fops);
if (!p)
return -ENOMEM;
- p->proc_fops = &sctp_snmp_seq_fops;
-
return 0;
}