From 160f17e345f5b50484d6cdc985b8686a05bf015d Mon Sep 17 00:00:00 2001 From: Wang Chen Date: Thu, 28 Feb 2008 14:13:16 -0800 Subject: [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 Signed-off-by: David S. Miller --- net/sctp/proc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/sctp/proc.c') 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; } -- cgit v1.2.2