aboutsummaryrefslogtreecommitdiffstats
path: root/net/phonet
diff options
context:
space:
mode:
Diffstat (limited to 'net/phonet')
-rw-r--r--net/phonet/socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index 6e9848bf0370..7c91f739f138 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -281,7 +281,9 @@ static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
281 if (!mask && sk->sk_state == TCP_CLOSE_WAIT) 281 if (!mask && sk->sk_state == TCP_CLOSE_WAIT)
282 return POLLHUP; 282 return POLLHUP;
283 283
284 if (sk->sk_state == TCP_ESTABLISHED && atomic_read(&pn->tx_credits)) 284 if (sk->sk_state == TCP_ESTABLISHED &&
285 atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf &&
286 atomic_read(&pn->tx_credits))
285 mask |= POLLOUT | POLLWRNORM | POLLWRBAND; 287 mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
286 288
287 return mask; 289 return mask;