diff mbox

PATCH: virtio_console: Fix poll blocking even though there is data to read

Message ID 4C90C475.4010809@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans de Goede Sept. 15, 2010, 1:04 p.m. UTC
None
diff mbox

Patch

diff -up linux-2.6.35.x86_64/drivers/char/virtio_console.c~ linux-2.6.35.x86_64/drivers/char/virtio_console.c
--- linux-2.6.35.x86_64/drivers/char/virtio_console.c~	2010-08-02 00:11:14.000000000 +0200
+++ linux-2.6.35.x86_64/drivers/char/virtio_console.c	2010-09-15 13:39:29.043505000 +0200
@@ -642,7 +642,7 @@  static unsigned int port_fops_poll(struc
 	poll_wait(filp, &port->waitqueue, wait);
 
 	ret = 0;
-	if (port->inbuf)
+	if (!will_read_block(port))
 		ret |= POLLIN | POLLRDNORM;
 	if (!will_write_block(port))
 		ret |= POLLOUT;