aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_timewait_sock.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-02-28 04:26:07 -0500
committerIngo Molnar <mingo@elte.hu>2012-02-28 04:27:36 -0500
commit458ce2910aa83d8a2cafb489d727f7da839e73c6 (patch)
tree28e088137eb068e5620f17eaf0ca19d1562006ed /include/net/inet_timewait_sock.h
parent69466466ce889cd2cbc8cda9ff1c6083f48cc7f9 (diff)
parent586c6e7013c8cbb8c91aaa6568ec349b1dc2c691 (diff)
Merge branch 'linus' into x86/asm
Sync up the latest NMI fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/net/inet_timewait_sock.h')
-rw-r--r--include/net/inet_timewait_sock.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index e8c25b981205..ba52c830a7a5 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -218,20 +218,12 @@ extern void inet_twsk_purge(struct inet_hashinfo *hashinfo,
218static inline 218static inline
219struct net *twsk_net(const struct inet_timewait_sock *twsk) 219struct net *twsk_net(const struct inet_timewait_sock *twsk)
220{ 220{
221#ifdef CONFIG_NET_NS 221 return read_pnet(&twsk->tw_net);
222 return rcu_dereference_raw(twsk->tw_net); /* protected by locking, */
223 /* reference counting, */
224 /* initialization, or RCU. */
225#else
226 return &init_net;
227#endif
228} 222}
229 223
230static inline 224static inline
231void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net) 225void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net)
232{ 226{
233#ifdef CONFIG_NET_NS 227 write_pnet(&twsk->tw_net, net);
234 rcu_assign_pointer(twsk->tw_net, net);
235#endif
236} 228}
237#endif /* _INET_TIMEWAIT_SOCK_ */ 229#endif /* _INET_TIMEWAIT_SOCK_ */