aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrlabel.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 13:26:21 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 15:39:55 -0400
commit3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (patch)
tree09edb35f32ebcfb1b4dad904425128a110ef16ee /net/ipv6/addrlabel.c
parentc346dca10840a874240c78efe3f39acf4312a1f2 (diff)
[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
Introduce per-sock inlines: sock_net(), sock_net_set() and per-inet_timewait_sock inlines: twsk_net(), twsk_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/ipv6/addrlabel.c')
-rw-r--r--net/ipv6/addrlabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index de371b5997fe..9bfa8846f262 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -364,7 +364,7 @@ static const struct nla_policy ifal_policy[IFAL_MAX+1] = {
364static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh, 364static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh,
365 void *arg) 365 void *arg)
366{ 366{
367 struct net *net = skb->sk->sk_net; 367 struct net *net = sock_net(skb->sk);
368 struct ifaddrlblmsg *ifal; 368 struct ifaddrlblmsg *ifal;
369 struct nlattr *tb[IFAL_MAX+1]; 369 struct nlattr *tb[IFAL_MAX+1];
370 struct in6_addr *pfx; 370 struct in6_addr *pfx;
@@ -452,7 +452,7 @@ static int ip6addrlbl_fill(struct sk_buff *skb,
452 452
453static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb) 453static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb)
454{ 454{
455 struct net *net = skb->sk->sk_net; 455 struct net *net = sock_net(skb->sk);
456 struct ip6addrlbl_entry *p; 456 struct ip6addrlbl_entry *p;
457 struct hlist_node *pos; 457 struct hlist_node *pos;
458 int idx = 0, s_idx = cb->args[0]; 458 int idx = 0, s_idx = cb->args[0];
@@ -490,7 +490,7 @@ static inline int ip6addrlbl_msgsize(void)
490static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, 490static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh,
491 void *arg) 491 void *arg)
492{ 492{
493 struct net *net = in_skb->sk->sk_net; 493 struct net *net = sock_net(in_skb->sk);
494 struct ifaddrlblmsg *ifal; 494 struct ifaddrlblmsg *ifal;
495 struct nlattr *tb[IFAL_MAX+1]; 495 struct nlattr *tb[IFAL_MAX+1];
496 struct in6_addr *addr; 496 struct in6_addr *addr;