[Suspend2][ 13/20] [Suspend2] Try to refreeze processes.

Nigel Cunningham
2006-06-26T22:36:41Z

Try to refreeze processes after thawing kernel threads to eat memory. This
shouldn't fail, but if it does, we ensure it's handled nicely.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/prepare_image.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/kernel/power/prepare_image.c b/kernel/power/prepare_image.c
index 6b3f2c9..4e012a7 100644
--- a/kernel/power/prepare_image.c
+++ b/kernel/power/prepare_image.c
@@ -394,3 +394,11 @@ void suspend_recalculate_image_contents(
return;
}

+static void try_freeze_processes(void)
+{
+ if (freeze_processes()) {
+ set_result_state(SUSPEND_FREEZING_FAILED);
+ set_result_state(SUSPEND_ABORTED);
+ }