Phonet: use atomic for packet TX window
GPRS TX flow control won't need to lock the underlying socket anymore. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
57c81fffc8
commit
be677730a0
@@ -227,7 +227,7 @@ static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
|
||||
if (!mask && sk->sk_state == TCP_CLOSE_WAIT)
|
||||
return POLLHUP;
|
||||
|
||||
if (sk->sk_state == TCP_ESTABLISHED && pn->tx_credits)
|
||||
if (sk->sk_state == TCP_ESTABLISHED && atomic_read(&pn->tx_credits))
|
||||
mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
|
||||
|
||||
return mask;
|
||||
|
Reference in New Issue
Block a user