aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_balloon.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 17:50:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 17:50:58 -0400
commit5f129721713e099a04c6024015f97faa58562ab1 (patch)
treec5a498f217da044eb5ce870bedc95c4bf82cf185 /drivers/virtio/virtio_balloon.c
parent15a49b9a90c86c6cb7f270a699d2ae7468862c28 (diff)
parentc893c8d763d8a8a757028a48ace7d1bb2dd8373f (diff)
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull virtio updates from Rusty Russell: "No real surprises" * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: MAINTAINERS: add tools/virtio/ under virtio tools/virtio: move module license stub to module.h virtio: include asm/barrier explicitly virtio: VIRTIO_F_ANY_LAYOUT feature lguest: fix example launcher compilation for broken glibc headers. virtio-net: fix the race between channels setting and refill tools/lguest: real barriers. tools/lguest: fix missing rmb(). virtio_balloon: leak_balloon(): only tell host if we got pages deflated virtio-pci: fix leaks of msix_affinity_masks Fix comment typo "CONFIG_PAE"
Diffstat (limited to 'drivers/virtio/virtio_balloon.c')
-rw-r--r--drivers/virtio/virtio_balloon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0098810df69d..1f572c00a1be 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -192,7 +192,8 @@ static void leak_balloon(struct virtio_balloon *vb, size_t num)
192 * virtio_has_feature(vdev, VIRTIO_BALLOON_F_MUST_TELL_HOST); 192 * virtio_has_feature(vdev, VIRTIO_BALLOON_F_MUST_TELL_HOST);
193 * is true, we *have* to do it in this order 193 * is true, we *have* to do it in this order
194 */ 194 */
195 tell_host(vb, vb->deflate_vq); 195 if (vb->num_pfns != 0)
196 tell_host(vb, vb->deflate_vq);
196 mutex_unlock(&vb->balloon_lock); 197 mutex_unlock(&vb->balloon_lock);
197 release_pages_by_pfn(vb->pfns, vb->num_pfns); 198 release_pages_by_pfn(vb->pfns, vb->num_pfns);
198} 199}