Skip to content

Commit

Permalink
[APPLETALK]: Use proc_create() to setup ->proc_fops first
Browse files Browse the repository at this point in the history
As Davem mentioned in his recently patch
(d9595a7)
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: Wang Chen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wang Chen authored and davem330 committed Feb 28, 2008
1 parent 4d9d2cb commit ed2b5b4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions net/appletalk/atalk_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,25 +283,24 @@ int __init atalk_proc_init(void)
goto out;
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)
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)
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)
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)
goto out_arp;
p->proc_fops = &atalk_seq_arp_fops;

rc = 0;
out:
Expand Down

0 comments on commit ed2b5b4

Please sign in to comment.