From c3506372277779fccbffee2475400fcd689d5738 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 10 Apr 2018 19:42:55 +0200 Subject: 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 --- net/ipv6/ip6_fib.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'net/ipv6/ip6_fib.c') diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index deab2db6692e..01372dd74e38 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -2209,15 +2209,6 @@ void fib6_gc_cleanup(void) } #ifdef CONFIG_PROC_FS - -struct ipv6_route_iter { - struct seq_net_private p; - struct fib6_walker w; - loff_t skip; - struct fib6_table *tbl; - int sernum; -}; - static int ipv6_route_seq_show(struct seq_file *seq, void *v) { struct rt6_info *rt = v; @@ -2383,17 +2374,10 @@ static void ipv6_route_seq_stop(struct seq_file *seq, void *v) rcu_read_unlock_bh(); } -static const struct seq_operations ipv6_route_seq_ops = { +const struct seq_operations ipv6_route_seq_ops = { .start = ipv6_route_seq_start, .next = ipv6_route_seq_next, .stop = ipv6_route_seq_stop, .show = ipv6_route_seq_show }; - -int ipv6_route_open(struct inode *inode, struct file *file) -{ - return seq_open_net(inode, file, &ipv6_route_seq_ops, - sizeof(struct ipv6_route_iter)); -} - #endif /* CONFIG_PROC_FS */ -- cgit v1.2.3