diff options
author | Eric Dumazet <edumazet@google.com> | 2015-11-29 20:03:10 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-01 15:45:05 -0500 |
commit | 9cd3e072b0be17446e37d7414eac8a3499e0601e (patch) | |
tree | 83c6aac4a5164b4854a5d5d5deba1a513eee7157 /net/caif | |
parent | 5738a09d58d5ad2871f1f9a42bf6a3aa9ece5b3c (diff) | |
download | op-kernel-dev-9cd3e072b0be17446e37d7414eac8a3499e0601e.zip op-kernel-dev-9cd3e072b0be17446e37d7414eac8a3499e0601e.tar.gz |
net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA
This patch is a cleanup to make following patch easier to
review.
Goal is to move SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA
from (struct socket)->flags to a (struct socket_wq)->flags
to benefit from RCU protection in sock_wake_async()
To ease backports, we rename both constants.
Two new helpers, sk_set_bit(int nr, struct sock *sk)
and sk_clear_bit(int net, struct sock *sk) are added so that
following patch can change their implementation.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r-- | net/caif/caif_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index cc85891..aa209b1 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -323,7 +323,7 @@ static long caif_stream_data_wait(struct sock *sk, long timeo) !timeo) break; - set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); + sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk); release_sock(sk); timeo = schedule_timeout(timeo); lock_sock(sk); @@ -331,7 +331,7 @@ static long caif_stream_data_wait(struct sock *sk, long timeo) if (sock_flag(sk, SOCK_DEAD)) break; - clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); + sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk); } finish_wait(sk_sleep(sk), &wait); |