From patchwork Thu Jun 3 19:33:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Rogers X-Patchwork-Id: 104166 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o53Js75n020942 for ; Thu, 3 Jun 2010 19:54:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756468Ab0FCTyE (ORCPT ); Thu, 3 Jun 2010 15:54:04 -0400 Received: from sinclair.provo.novell.com ([137.65.248.137]:17245 "EHLO sinclair.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756450Ab0FCTyB convert rfc822-to-8bit (ORCPT ); Thu, 3 Jun 2010 15:54:01 -0400 Received: from INET-PRV-MTA by sinclair.provo.novell.com with Novell_GroupWise; Thu, 03 Jun 2010 13:34:02 -0600 Message-Id: <4C07AF47020000480009748E@sinclair.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 03 Jun 2010 13:33:59 -0600 From: "Bruce Rogers" To: Cc: , Subject: [PATCH 1/3][STABLE] KVM: fix delayed refill checking Mime-Version: 1.0 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 03 Jun 2010 19:54:16 +0000 (UTC) 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