diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 08:47:49 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 15:39:53 -0400 |
commit | c346dca10840a874240c78efe3f39acf4312a1f2 (patch) | |
tree | c04cff20124eba5cc337cc5ec260ad2513eeb065 /drivers/net/wan/lapbether.c | |
parent | 7cbca67c073263c179f605bdbbdc565ab29d801d (diff) |
[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>
Diffstat (limited to 'drivers/net/wan/lapbether.c')
-rw-r--r-- | drivers/net/wan/lapbether.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index fb37b8095231..629c909e05f9 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c | |||
@@ -91,7 +91,7 @@ static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
91 | int len, err; | 91 | int len, err; |
92 | struct lapbethdev *lapbeth; | 92 | struct lapbethdev *lapbeth; |
93 | 93 | ||
94 | if (dev->nd_net != &init_net) | 94 | if (dev_net(dev) != &init_net) |
95 | goto drop; | 95 | goto drop; |
96 | 96 | ||
97 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) | 97 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) |
@@ -393,7 +393,7 @@ static int lapbeth_device_event(struct notifier_block *this, | |||
393 | struct lapbethdev *lapbeth; | 393 | struct lapbethdev *lapbeth; |
394 | struct net_device *dev = ptr; | 394 | struct net_device *dev = ptr; |
395 | 395 | ||
396 | if (dev->nd_net != &init_net) | 396 | if (dev_net(dev) != &init_net) |
397 | return NOTIFY_DONE; | 397 | return NOTIFY_DONE; |
398 | 398 | ||
399 | if (!dev_is_ethdev(dev)) | 399 | if (!dev_is_ethdev(dev)) |