diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 13:26:21 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 15:39:55 -0400 |
commit | 3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (patch) | |
tree | 09edb35f32ebcfb1b4dad904425128a110ef16ee /net/bridge | |
parent | c346dca10840a874240c78efe3f39acf4312a1f2 (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/bridge')
-rw-r--r-- | net/bridge/br_netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index f5d69336d97b..f155e6ce8a21 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -108,7 +108,7 @@ errout: | |||
108 | */ | 108 | */ |
109 | static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) | 109 | static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) |
110 | { | 110 | { |
111 | struct net *net = skb->sk->sk_net; | 111 | struct net *net = sock_net(skb->sk); |
112 | struct net_device *dev; | 112 | struct net_device *dev; |
113 | int idx; | 113 | int idx; |
114 | 114 | ||
@@ -140,7 +140,7 @@ skip: | |||
140 | */ | 140 | */ |
141 | static int br_rtm_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | 141 | static int br_rtm_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) |
142 | { | 142 | { |
143 | struct net *net = skb->sk->sk_net; | 143 | struct net *net = sock_net(skb->sk); |
144 | struct ifinfomsg *ifm; | 144 | struct ifinfomsg *ifm; |
145 | struct nlattr *protinfo; | 145 | struct nlattr *protinfo; |
146 | struct net_device *dev; | 146 | struct net_device *dev; |