aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrlabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/addrlabel.c')
-rw-r--r--net/ipv6/addrlabel.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 59c793040498..3cc50e2d3bf5 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -29,9 +29,7 @@
* Policy Table
*/
struct ip6addrlbl_entry {
-#ifdef CONFIG_NET_NS
- struct net *lbl_net;
-#endif
+ possible_net_t lbl_net;
struct in6_addr prefix;
int prefixlen;
int ifindex;
@@ -237,9 +235,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(struct net *net,
newp->addrtype = addrtype;
newp->label = label;
INIT_HLIST_NODE(&newp->list);
-#ifdef CONFIG_NET_NS
- newp->lbl_net = net;
-#endif
+ write_pnet(&newp->lbl_net, net);
atomic_set(&newp->refcnt, 1);
return newp;
}