|
@@ -159,7 +159,8 @@ static unsigned int rds_poll(struct file *file, struct socket *sock,
|
|
|
|
|
|
poll_wait(file, sk->sk_sleep, wait);
|
|
|
|
|
|
- poll_wait(file, &rds_poll_waitq, wait);
|
|
|
+ if (rs->rs_seen_congestion)
|
|
|
+ poll_wait(file, &rds_poll_waitq, wait);
|
|
|
|
|
|
read_lock_irqsave(&rs->rs_recv_lock, flags);
|
|
|
if (!rs->rs_cong_monitor) {
|
|
@@ -181,6 +182,10 @@ static unsigned int rds_poll(struct file *file, struct socket *sock,
|
|
|
mask |= (POLLOUT | POLLWRNORM);
|
|
|
read_unlock_irqrestore(&rs->rs_recv_lock, flags);
|
|
|
|
|
|
+ /* clear state any time we wake a seen-congested socket */
|
|
|
+ if (mask)
|
|
|
+ rs->rs_seen_congestion = 0;
|
|
|
+
|
|
|
return mask;
|
|
|
}
|
|
|
|