Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: tap: fix POLLOUT condition in tap_poll()
@ 2017-12-14 14:22 yuan linyu
  2017-12-17  4:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: yuan linyu @ 2017-12-14 14:22 UTC (permalink / raw)
  To: netdev; +Cc: David S . Miller, yuan linyu

From: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>

from logical view, if sock_writeable(&q->sk) return false,
original second condition will return false too,
change it and make second condition can return true.

Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
---
 drivers/net/tap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index 0a886fda..72212bf 100644
--- a/drivers/net/tap.c
+++ b/drivers/net/tap.c
@@ -587,8 +587,7 @@ static unsigned int tap_poll(struct file *file, poll_table *wait)
 		mask |= POLLIN | POLLRDNORM;
 
 	if (sock_writeable(&q->sk) ||
-	    (!test_and_set_bit(SOCKWQ_ASYNC_NOSPACE, &q->sock.flags) &&
-	     sock_writeable(&q->sk)))
+	    !test_and_set_bit(SOCKWQ_ASYNC_NOSPACE, &q->sock.flags))
 		mask |= POLLOUT | POLLWRNORM;
 
 out:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-17  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 14:22 [PATCH net-next] net: tap: fix POLLOUT condition in tap_poll() yuan linyu
2017-12-17  4:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox