lkml.org 
[lkml]   [2016]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next 2/3] ipv6: per netns fib6 walkers
From
From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 4 Mar 2016 11:59:25 +0100 (CET)

> @@ -1978,6 +1980,12 @@ static int ipv6_route_yield(struct fib6_walker *w)
>
> static void ipv6_route_seq_setup_walk(struct ipv6_route_iter *iter)
> {
> +#ifdef CONFIG_NET_NS
> + struct net *net = iter->p.net;
> +#else
> + struct net *net = &init_net;
> +#endif

Please use read_pnet(), it exists so that we don't need to do ugly CPP
stuff like this in *.c files.

Thanks.

\
 
 \ /
  Last update: 2016-03-07 21:21    [W:0.066 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site