diff mbox

[1/3,STABLE] KVM: fix delayed refill checking

Message ID 4C07AF47020000480009748E@sinclair.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bruce Rogers June 3, 2010, 7:33 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index c708ecc..9ead30b 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -395,8 +395,7 @@  static void refill_work(struct work_struct *work)

        vi = container_of(work, struct virtnet_info, refill.work);
        napi_disable(&vi->napi);
-       try_fill_recv(vi, GFP_KERNEL);
-       still_empty = (vi->num == 0);
+       still_empty = !try_fill_recv(vi, GFP_KERNEL);
        napi_enable(&vi->napi);

        /* In theory, this can happen: if we don't get any buffers in