aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-04-16 20:14:04 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-04-19 09:44:01 -0400
commit84a139a985300901dfad99bd93c7345d180af860 (patch)
tree62a8921435f17551db2f26c8f0755f4ab508f537 /drivers/virtio
parenta489f0b555b753f9df8ddc24c7e74f657ef7ee7b (diff)
virtio: fix suspend when using virtio_balloon
Break out of wait_event_interruptible() if freezing has been requested, in the vballoon thread. Without this change vballoon refuses to stop and the system can't suspend. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: stable@kernel.org
Diffstat (limited to 'drivers/virtio')
-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 59268266b79a..9c76a061a04d 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -190,7 +190,8 @@ static int balloon(void *_vballoon)
190 try_to_freeze(); 190 try_to_freeze();
191 wait_event_interruptible(vb->config_change, 191 wait_event_interruptible(vb->config_change,
192 (diff = towards_target(vb)) != 0 192 (diff = towards_target(vb)) != 0
193 || kthread_should_stop()); 193 || kthread_should_stop()
194 || freezing(current));
194 if (diff > 0) 195 if (diff > 0)
195 fill_balloon(vb, diff); 196 fill_balloon(vb, diff);
196 else if (diff < 0) 197 else if (diff < 0)