swsusp: fix error handling in "not enough swap space"

From: Pavel Machek
Date: Sun Feb 29 2004 - 08:06:32 EST


Hi!

Without this, if there's not enough swapspace, suspend fails, but
leaves devices suspended, leading to dead machine. Please apply,

Pavel

--- tmp/linux/kernel/power/swsusp.c 2004-02-29 13:42:02.000000000 +0100
+++ linux/kernel/power/swsusp.c 2004-02-29 00:34:31.000000000 +0100
@@ -683,7 +683,11 @@

free_pages((unsigned long) pagedir_nosave, pagedir_order);
spin_unlock_irq(&suspend_pagedir_lock);
+
+ device_resume();
+ PRINTK( "Fixing swap signatures... " );
mark_swapfiles(((swp_entry_t) {0}), MARK_SWAP_RESUME);
+ PRINTK( "ok\n" );
}

/*


--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/