Revert "net: correct sk_acceptq_is_full()"
This reverts commitf211ac1545
. We had similar attempt in the past, and we reverted it. History:64a146513f
[NET]: Revert incorrect accept queue backlog changes.8488df894d
[NET]: Fix bugs in "Whether sock accept queue is full" checking I am adding a fat comment so that future attempts will be much harder. Fixes:f211ac1545
("net: correct sk_acceptq_is_full()") Cc: iuyacan <yacanliu@163.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9dc22c0d04
commit
c609e6aae4
|
@ -934,9 +934,13 @@ static inline void sk_acceptq_added(struct sock *sk)
|
|||
WRITE_ONCE(sk->sk_ack_backlog, sk->sk_ack_backlog + 1);
|
||||
}
|
||||
|
||||
/* Note: If you think the test should be:
|
||||
* return READ_ONCE(sk->sk_ack_backlog) >= READ_ONCE(sk->sk_max_ack_backlog);
|
||||
* Then please take a look at commit 64a146513f8f ("[NET]: Revert incorrect accept queue backlog changes.")
|
||||
*/
|
||||
static inline bool sk_acceptq_is_full(const struct sock *sk)
|
||||
{
|
||||
return READ_ONCE(sk->sk_ack_backlog) >= READ_ONCE(sk->sk_max_ack_backlog);
|
||||
return READ_ONCE(sk->sk_ack_backlog) > READ_ONCE(sk->sk_max_ack_backlog);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue