aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pppoe.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 08:47:49 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 15:39:53 -0400
commitc346dca10840a874240c78efe3f39acf4312a1f2 (patch)
treec04cff20124eba5cc337cc5ec260ad2513eeb065 /drivers/net/pppoe.c
parent7cbca67c073263c179f605bdbbdc565ab29d801d (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/pppoe.c')
-rw-r--r--drivers/net/pppoe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index ac0ac98b19cd..4fad4ddb3504 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -301,7 +301,7 @@ static int pppoe_device_event(struct notifier_block *this,
301{ 301{
302 struct net_device *dev = (struct net_device *) ptr; 302 struct net_device *dev = (struct net_device *) ptr;
303 303
304 if (dev->nd_net != &init_net) 304 if (dev_net(dev) != &init_net)
305 return NOTIFY_DONE; 305 return NOTIFY_DONE;
306 306
307 /* Only look at sockets that are using this specific device. */ 307 /* Only look at sockets that are using this specific device. */
@@ -392,7 +392,7 @@ static int pppoe_rcv(struct sk_buff *skb,
392 if (!(skb = skb_share_check(skb, GFP_ATOMIC))) 392 if (!(skb = skb_share_check(skb, GFP_ATOMIC)))
393 goto out; 393 goto out;
394 394
395 if (dev->nd_net != &init_net) 395 if (dev_net(dev) != &init_net)
396 goto drop; 396 goto drop;
397 397
398 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) 398 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
@@ -424,7 +424,7 @@ static int pppoe_disc_rcv(struct sk_buff *skb,
424 struct pppoe_hdr *ph; 424 struct pppoe_hdr *ph;
425 struct pppox_sock *po; 425 struct pppox_sock *po;
426 426
427 if (dev->nd_net != &init_net) 427 if (dev_net(dev) != &init_net)
428 goto abort; 428 goto abort;
429 429
430 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) 430 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))