summaryrefslogtreecommitdiff
path: root/net/sctp/objcnt.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-02-29 01:13:16 +0300
committerDavid S. Miller <davem@davemloft.net>2008-02-29 01:13:16 +0300
commit160f17e345f5b50484d6cdc985b8686a05bf015d (patch)
tree3e455929c0b53b90ed08f123147ed52aa115c5bf /net/sctp/objcnt.c
parent25296d599ccc7e06af217329729e4d7154fa79a2 (diff)
downloadlinux-160f17e345f5b50484d6cdc985b8686a05bf015d.tar.xz
[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/objcnt.c')
-rw-r--r--net/sctp/objcnt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
index 14e294e37626..cfeb07ea1b04 100644
--- a/net/sctp/objcnt.c
+++ b/net/sctp/objcnt.c
@@ -132,12 +132,11 @@ void sctp_dbg_objcnt_init(void)
{
struct proc_dir_entry *ent;
- ent = create_proc_entry("sctp_dbg_objcnt", 0, proc_net_sctp);
+ ent = proc_create("sctp_dbg_objcnt", 0,
+ proc_net_sctp, &sctp_objcnt_ops);
if (!ent)
printk(KERN_WARNING
"sctp_dbg_objcnt: Unable to create /proc entry.\n");
- else
- ent->proc_fops = &sctp_objcnt_ops;
}
/* Cleanup the objcount entry in the proc filesystem. */