diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 03:44:08 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 03:44:08 -0400 |
| commit | 1d2a1959fe534279cf37aba20b08c24c20840e52 (patch) | |
| tree | 67c0b9aa7fe22a44bf0b4af88947799203eb8f67 /include/net/sock.h | |
| parent | 5a79ce76e9bb8f4b2cd8106ee36d15ee05013bcf (diff) | |
| parent | 054cfaacf88865bff1dd58d305443d5d6c068a08 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'include/net/sock.h')
| -rw-r--r-- | include/net/sock.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index bc1cf7d88ccb..da0534d3401c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -281,7 +281,7 @@ struct sock { | |||
| 281 | int sk_rcvbuf; | 281 | int sk_rcvbuf; |
| 282 | 282 | ||
| 283 | struct sk_filter __rcu *sk_filter; | 283 | struct sk_filter __rcu *sk_filter; |
| 284 | struct socket_wq *sk_wq; | 284 | struct socket_wq __rcu *sk_wq; |
| 285 | 285 | ||
| 286 | #ifdef CONFIG_NET_DMA | 286 | #ifdef CONFIG_NET_DMA |
| 287 | struct sk_buff_head sk_async_wait_queue; | 287 | struct sk_buff_head sk_async_wait_queue; |
| @@ -1191,7 +1191,7 @@ extern void sk_filter_release_rcu(struct rcu_head *rcu); | |||
| 1191 | static inline void sk_filter_release(struct sk_filter *fp) | 1191 | static inline void sk_filter_release(struct sk_filter *fp) |
| 1192 | { | 1192 | { |
| 1193 | if (atomic_dec_and_test(&fp->refcnt)) | 1193 | if (atomic_dec_and_test(&fp->refcnt)) |
| 1194 | call_rcu_bh(&fp->rcu, sk_filter_release_rcu); | 1194 | call_rcu(&fp->rcu, sk_filter_release_rcu); |
| 1195 | } | 1195 | } |
| 1196 | 1196 | ||
| 1197 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) | 1197 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) |
| @@ -1266,7 +1266,8 @@ static inline void sk_set_socket(struct sock *sk, struct socket *sock) | |||
| 1266 | 1266 | ||
| 1267 | static inline wait_queue_head_t *sk_sleep(struct sock *sk) | 1267 | static inline wait_queue_head_t *sk_sleep(struct sock *sk) |
| 1268 | { | 1268 | { |
| 1269 | return &sk->sk_wq->wait; | 1269 | BUILD_BUG_ON(offsetof(struct socket_wq, wait) != 0); |
| 1270 | return &rcu_dereference_raw(sk->sk_wq)->wait; | ||
| 1270 | } | 1271 | } |
| 1271 | /* Detach socket from process context. | 1272 | /* Detach socket from process context. |
| 1272 | * Announce socket dead, detach it from wait queue and inode. | 1273 | * Announce socket dead, detach it from wait queue and inode. |
| @@ -1287,7 +1288,7 @@ static inline void sock_orphan(struct sock *sk) | |||
| 1287 | static inline void sock_graft(struct sock *sk, struct socket *parent) | 1288 | static inline void sock_graft(struct sock *sk, struct socket *parent) |
| 1288 | { | 1289 | { |
| 1289 | write_lock_bh(&sk->sk_callback_lock); | 1290 | write_lock_bh(&sk->sk_callback_lock); |
| 1290 | rcu_assign_pointer(sk->sk_wq, parent->wq); | 1291 | sk->sk_wq = parent->wq; |
| 1291 | parent->sk = sk; | 1292 | parent->sk = sk; |
| 1292 | sk_set_socket(sk, parent); | 1293 | sk_set_socket(sk, parent); |
| 1293 | security_sock_graft(sk, parent); | 1294 | security_sock_graft(sk, parent); |
