[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>
This commit is contained in:
parent
c346dca108
commit
3b1e0a655f
69 changed files with 253 additions and 215 deletions
|
|
@ -1375,7 +1375,7 @@ static int accept(struct socket *sock, struct socket *newsock, int flags)
|
|||
}
|
||||
buf = skb_peek(&sock->sk->sk_receive_queue);
|
||||
|
||||
res = tipc_create(sock->sk->sk_net, newsock, 0);
|
||||
res = tipc_create(sock_net(sock->sk), newsock, 0);
|
||||
if (!res) {
|
||||
struct tipc_sock *new_tsock = tipc_sk(newsock->sk);
|
||||
struct tipc_portid id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue