]> git.hungrycats.org Git - linux/commitdiff
[PATCH] swsusp: fix error handling in "not enough swap space"
authorAndrew Morton <akpm@osdl.org>
Mon, 1 Mar 2004 15:06:54 +0000 (07:06 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 1 Mar 2004 15:06:54 +0000 (07:06 -0800)
From: Pavel Machek <pavel@ucw.cz>

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

kernel/power/swsusp.c

index 3e9ec77a133a91f828adc50ddeeceb2af056f43e..20134ab8e0b2231f2390c584acb7d1db4f74bc27 100644 (file)
@@ -673,7 +673,11 @@ asmlinkage void do_magic_suspend_2(void)
 
        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" );
 }
 
 /*