[NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
Introduce per-net_device inlines: dev_net(), dev_net_set(). Without CONFIG_NET_NS, no namespace other than &init_net exists. Let's explicitly define them to help compiler optimizations. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
This commit is contained in:
@ -221,7 +221,7 @@ static void xfrm4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
|
||||
xdst = (struct xfrm_dst *)dst;
|
||||
if (xdst->u.rt.idev->dev == dev) {
|
||||
struct in_device *loopback_idev =
|
||||
in_dev_get(dev->nd_net->loopback_dev);
|
||||
in_dev_get(dev_net(dev)->loopback_dev);
|
||||
BUG_ON(!loopback_idev);
|
||||
|
||||
do {
|
||||
|
Reference in New Issue
Block a user