[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/include/net/route.h b/include/net/route.h
index 28dba92..c633880 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -160,7 +160,7 @@
 					 .dport = dport } } };
 
 	int err;
-	struct net *net = sk->sk_net;
+	struct net *net = sock_net(sk);
 	if (!dst || !src) {
 		err = __ip_route_output_key(net, rp, &fl);
 		if (err)
@@ -188,7 +188,7 @@
 		ip_rt_put(*rp);
 		*rp = NULL;
 		security_sk_classify_flow(sk, &fl);
-		return ip_route_output_flow(sk->sk_net, rp, &fl, sk, 0);
+		return ip_route_output_flow(sock_net(sk), rp, &fl, sk, 0);
 	}
 	return 0;
 }