Commit 52c0e111 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

netfilter: assign PDE->fops before gluing PDE into /proc tree

Replace create_proc_entry with specially created for this purpose proc_create.
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Acked-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84841c3c
...@@ -296,11 +296,11 @@ static int nf_conntrack_standalone_init_proc(void) ...@@ -296,11 +296,11 @@ static int nf_conntrack_standalone_init_proc(void)
pde = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); pde = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops);
if (!pde) if (!pde)
goto out_nf_conntrack; goto out_nf_conntrack;
pde = create_proc_entry("nf_conntrack", S_IRUGO, init_net.proc_net_stat);
pde = proc_create("nf_conntrack", S_IRUGO, init_net.proc_net_stat,
&ct_cpu_seq_fops);
if (!pde) if (!pde)
goto out_stat_nf_conntrack; goto out_stat_nf_conntrack;
pde->proc_fops = &ct_cpu_seq_fops;
pde->owner = THIS_MODULE;
return 0; return 0;
out_stat_nf_conntrack: out_stat_nf_conntrack:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment