Commit 8b169240 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

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

Replace proc_net_fops_create with proc_create_data.
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 52c0e111
...@@ -936,25 +936,24 @@ int xt_proto_init(struct net *net, int af) ...@@ -936,25 +936,24 @@ int xt_proto_init(struct net *net, int af)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
strlcpy(buf, xt_prefix[af], sizeof(buf)); strlcpy(buf, xt_prefix[af], sizeof(buf));
strlcat(buf, FORMAT_TABLES, sizeof(buf)); strlcat(buf, FORMAT_TABLES, sizeof(buf));
proc = proc_net_fops_create(net, buf, 0440, &xt_table_ops); proc = proc_create_data(buf, 0440, net->proc_net, &xt_table_ops,
(void *)(unsigned long)af);
if (!proc) if (!proc)
goto out; goto out;
proc->data = (void *)(unsigned long)af;
strlcpy(buf, xt_prefix[af], sizeof(buf)); strlcpy(buf, xt_prefix[af], sizeof(buf));
strlcat(buf, FORMAT_MATCHES, sizeof(buf)); strlcat(buf, FORMAT_MATCHES, sizeof(buf));
proc = proc_net_fops_create(net, buf, 0440, &xt_match_ops); proc = proc_create_data(buf, 0440, net->proc_net, &xt_match_ops,
(void *)(unsigned long)af);
if (!proc) if (!proc)
goto out_remove_tables; goto out_remove_tables;
proc->data = (void *)(unsigned long)af;
strlcpy(buf, xt_prefix[af], sizeof(buf)); strlcpy(buf, xt_prefix[af], sizeof(buf));
strlcat(buf, FORMAT_TARGETS, sizeof(buf)); strlcat(buf, FORMAT_TARGETS, sizeof(buf));
proc = proc_net_fops_create(net, buf, 0440, &xt_target_ops); proc = proc_create_data(buf, 0440, net->proc_net, &xt_target_ops,
(void *)(unsigned long)af);
if (!proc) if (!proc)
goto out_remove_matches; goto out_remove_matches;
proc->data = (void *)(unsigned long)af;
#endif #endif
return 0; return 0;
......
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