diff mbox

net: netmap_poll must update both read/write poll state

Message ID 1395759898-12102-1-git-send-email-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi March 25, 2014, 3:04 p.m. UTC
From: Prasad Joshi <prasadjoshi.linux@gmail.com>

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 net/netmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/net/netmap.c b/net/netmap.c
index 8213304..0c1772b 100644
--- a/net/netmap.c
+++ b/net/netmap.c
@@ -177,8 +177,8 @@  static void netmap_poll(NetClientState *nc, bool enable)
     NetmapState *s = DO_UPCAST(NetmapState, nc, nc);
 
     if (s->read_poll != enable || s->write_poll != enable) {
-        s->read_poll = enable;
-        s->read_poll = enable;
+        s->write_poll = enable;
+        s->read_poll  = enable;
         netmap_update_fd_handler(s);
     }
 }