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>
This commit is contained in:

committed by
David S. Miller

parent
5738a09d58
commit
9cd3e072b0
@@ -421,7 +421,7 @@ static void lowcomms_write_space(struct sock *sk)
|
||||
|
||||
if (test_and_clear_bit(CF_APP_LIMITED, &con->flags)) {
|
||||
con->sock->sk->sk_write_pending--;
|
||||
clear_bit(SOCK_ASYNC_NOSPACE, &con->sock->flags);
|
||||
clear_bit(SOCKWQ_ASYNC_NOSPACE, &con->sock->flags);
|
||||
}
|
||||
|
||||
if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
|
||||
@@ -1448,7 +1448,7 @@ static void send_to_sock(struct connection *con)
|
||||
msg_flags);
|
||||
if (ret == -EAGAIN || ret == 0) {
|
||||
if (ret == -EAGAIN &&
|
||||
test_bit(SOCK_ASYNC_NOSPACE, &con->sock->flags) &&
|
||||
test_bit(SOCKWQ_ASYNC_NOSPACE, &con->sock->flags) &&
|
||||
!test_and_set_bit(CF_APP_LIMITED, &con->flags)) {
|
||||
/* Notify TCP that we're limited by the
|
||||
* application window size.
|
||||
|
Reference in New Issue
Block a user