diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8b17ed40dea2..7c1d4466583b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -758,7 +758,8 @@ static inline | |||
758 | void dev_net_set(struct net_device *dev, struct net *net) | 758 | void dev_net_set(struct net_device *dev, struct net *net) |
759 | { | 759 | { |
760 | #ifdef CONFIG_NET_NS | 760 | #ifdef CONFIG_NET_NS |
761 | dev->nd_net = net; | 761 | release_net(dev->nd_net); |
762 | dev->nd_net = hold_net(net); | ||
762 | #endif | 763 | #endif |
763 | } | 764 | } |
764 | 765 | ||