diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-04-19 18:05:04 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-27 10:37:04 -0700 |
commit | 7b0e3850488bbd218b6ea4cc0e5c6e549995a6f7 (patch) | |
tree | b73b749ad3d5369ec2b1aa1f7a733ac4d7fd5da3 | |
parent | cbe8fe4ae7f8bcc410c105810b263abf24439a53 (diff) |
virtio: fix suspend when using virtio_balloon
upstream commit: 84a139a985300901dfad99bd93c7345d180af860
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
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 59268266b79..9c76a061a04 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -190,7 +190,8 @@ static int balloon(void *_vballoon) try_to_freeze(); wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 - || kthread_should_stop()); + || kthread_should_stop() + || freezing(current)); if (diff > 0) fill_balloon(vb, diff); else if (diff < 0) |