aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-11-29 23:03:10 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-01 15:45:05 -0500
commit9cd3e072b0be17446e37d7414eac8a3499e0601e (patch)
tree83c6aac4a5164b4854a5d5d5deba1a513eee7157 /net/socket.c
parent5738a09d58d5ad2871f1f9a42bf6a3aa9ece5b3c (diff)
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/socket.c')
-rw-r--r--net/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c
index dd2c247c99e3..16be908205fc 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1072,11 +1072,11 @@ int sock_wake_async(struct socket *sock, int how, int band)
1072 } 1072 }
1073 switch (how) { 1073 switch (how) {
1074 case SOCK_WAKE_WAITD: 1074 case SOCK_WAKE_WAITD:
1075 if (test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) 1075 if (test_bit(SOCKWQ_ASYNC_WAITDATA, &sock->flags))
1076 break; 1076 break;
1077 goto call_kill; 1077 goto call_kill;
1078 case SOCK_WAKE_SPACE: 1078 case SOCK_WAKE_SPACE:
1079 if (!test_and_clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags)) 1079 if (!test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &sock->flags))
1080 break; 1080 break;
1081 /* fall through */ 1081 /* fall through */
1082 case SOCK_WAKE_IO: 1082 case SOCK_WAKE_IO: