]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/net/sock.h
net: CONFIG_NET_NS reduction
[mv-sheeva.git] / include / net / sock.h
index ca241ea148758a555d123343e2fe8639f7dd5bd3..3461e5d1e9adfac2d7294a87b2d4139b76df0dd8 100644 (file)
@@ -1724,19 +1724,13 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e
 static inline
 struct net *sock_net(const struct sock *sk)
 {
-#ifdef CONFIG_NET_NS
-       return sk->sk_net;
-#else
-       return &init_net;
-#endif
+       return read_pnet(&sk->sk_net);
 }
 
 static inline
 void sock_net_set(struct sock *sk, struct net *net)
 {
-#ifdef CONFIG_NET_NS
-       sk->sk_net = net;
-#endif
+       write_pnet(&sk->sk_net, net);
 }
 
 /*