From: Rafael J. Wysocki Date: Fri, 17 Feb 2006 21:52:51 +0000 (-0800) Subject: [PATCH] swsusp: fix breakage with swap on LVM X-Git-Tag: v2.6.16-rc4~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a8534adb74e23374889b84b3d97eb18da542a1b5;p=linux-2.6-omap-h63xx.git [PATCH] swsusp: fix breakage with swap on LVM Restore the compatibility with the older code and make it possible to suspend if the kernel command line doesn't contain the "resume=" argument Signed-off-by: Rafael J. Wysocki Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 4e90905f0e8..2d9d08f72f7 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c @@ -153,13 +153,11 @@ static int swsusp_swap_check(void) /* This is called before saving image */ { int i; - if (!swsusp_resume_device) - return -ENODEV; spin_lock(&swap_lock); for (i = 0; i < MAX_SWAPFILES; i++) { if (!(swap_info[i].flags & SWP_WRITEOK)) continue; - if (is_resume_device(swap_info + i)) { + if (!swsusp_resume_device || is_resume_device(swap_info + i)) { spin_unlock(&swap_lock); root_swap = i; return 0;