aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_synproxy_core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-10 19:42:55 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:24:30 +0200
commitc3506372277779fccbffee2475400fcd689d5738 (patch)
treed45d820f96a84a1223fa84c6ad4b7d84a81399aa /net/netfilter/nf_synproxy_core.c
parentnet: move seq_file_single_net to <linux/seq_file_net.h> (diff)
downloadlinux-dev-c3506372277779fccbffee2475400fcd689d5738.tar.xz
linux-dev-c3506372277779fccbffee2475400fcd689d5738.zip
proc: introduce proc_create_net{,_data}
Variants of proc_create{,_data} that directly take a struct seq_operations and deal with network namespaces in ->open and ->release. All callers of proc_create + seq_open_net converted over, and seq_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/netfilter/nf_synproxy_core.c')
-rw-r--r--net/netfilter/nf_synproxy_core.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index 6039b350abbe..8ff4d22f10b2 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -310,23 +310,10 @@ static const struct seq_operations synproxy_cpu_seq_ops = {
.show = synproxy_cpu_seq_show,
};
-static int synproxy_cpu_seq_open(struct inode *inode, struct file *file)
-{
- return seq_open_net(inode, file, &synproxy_cpu_seq_ops,
- sizeof(struct seq_net_private));
-}
-
-static const struct file_operations synproxy_cpu_seq_fops = {
- .open = synproxy_cpu_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release_net,
-};
-
static int __net_init synproxy_proc_init(struct net *net)
{
- if (!proc_create("synproxy", 0444, net->proc_net_stat,
- &synproxy_cpu_seq_fops))
+ if (!proc_create_net("synproxy", 0444, net->proc_net_stat,
+ &synproxy_cpu_seq_ops, sizeof(struct seq_net_private)))
return -ENOMEM;
return 0;
}