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 /net/core/rtnetlink.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 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 2bd9c5f7627d..09250a0800f6 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -972,7 +972,7 @@ struct net_device *rtnl_create_link(struct net *net, char *ifname, | |||
972 | goto err_free; | 972 | goto err_free; |
973 | } | 973 | } |
974 | 974 | ||
975 | dev->nd_net = net; | 975 | dev_net_set(dev, net); |
976 | dev->rtnl_link_ops = ops; | 976 | dev->rtnl_link_ops = ops; |
977 | 977 | ||
978 | if (tb[IFLA_MTU]) | 978 | if (tb[IFLA_MTU]) |
@@ -1198,7 +1198,7 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) | |||
1198 | 1198 | ||
1199 | void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change) | 1199 | void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change) |
1200 | { | 1200 | { |
1201 | struct net *net = dev->nd_net; | 1201 | struct net *net = dev_net(dev); |
1202 | struct sk_buff *skb; | 1202 | struct sk_buff *skb; |
1203 | int err = -ENOBUFS; | 1203 | int err = -ENOBUFS; |
1204 | 1204 | ||