提交 ed2b5b47 编写于 作者: W Wang Chen 提交者: David S. Miller

[APPLETALK]: Use proc_create() to setup ->proc_fops first

As Davem mentioned in his recently patch
(d9595a7b)
that the procfs visibility should occur after
the ->proc_fops are setup.

And also, Alexey provide proc_create() to make
sure that ->proc_fops is setup before gluing PDE
to main tree.

We use proc_create().
Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4d9d2cb0
...@@ -283,25 +283,24 @@ int __init atalk_proc_init(void) ...@@ -283,25 +283,24 @@ int __init atalk_proc_init(void)
goto out; goto out;
atalk_proc_dir->owner = THIS_MODULE; atalk_proc_dir->owner = THIS_MODULE;
p = create_proc_entry("interface", S_IRUGO, atalk_proc_dir); p = proc_create("interface", S_IRUGO, atalk_proc_dir,
&atalk_seq_interface_fops);
if (!p) if (!p)
goto out_interface; goto out_interface;
p->proc_fops = &atalk_seq_interface_fops;
p = create_proc_entry("route", S_IRUGO, atalk_proc_dir); p = proc_create("route", S_IRUGO, atalk_proc_dir,
&atalk_seq_route_fops);
if (!p) if (!p)
goto out_route; goto out_route;
p->proc_fops = &atalk_seq_route_fops;
p = create_proc_entry("socket", S_IRUGO, atalk_proc_dir); p = proc_create("socket", S_IRUGO, atalk_proc_dir,
&atalk_seq_socket_fops);
if (!p) if (!p)
goto out_socket; goto out_socket;
p->proc_fops = &atalk_seq_socket_fops;
p = create_proc_entry("arp", S_IRUGO, atalk_proc_dir); p = proc_create("arp", S_IRUGO, atalk_proc_dir, &atalk_seq_arp_fops);
if (!p) if (!p)
goto out_arp; goto out_arp;
p->proc_fops = &atalk_seq_arp_fops;
rc = 0; rc = 0;
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册