[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>
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 7768d71..194f5cc 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2689,7 +2689,7 @@
 
 static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
 {
-	struct net *net = in_skb->sk->sk_net;
+	struct net *net = sock_net(in_skb->sk);
 	struct rtmsg *rtm;
 	struct nlattr *tb[RTA_MAX+1];
 	struct rtable *rt = NULL;
@@ -2785,7 +2785,7 @@
 	int idx, s_idx;
 	struct net *net;
 
-	net = skb->sk->sk_net;
+	net = sock_net(skb->sk);
 
 	s_h = cb->args[0];
 	if (s_h < 0)