[PATCH 1/1] swsusp: fix breakage with swap on LVM
From: Rafael J. Wysocki
Date: Thu Feb 16 2006 - 10:02:25 EST
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 <rjw@xxxxxxx>
---
kernel/power/swsusp.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
Index: linux-2.6.16-rc3/kernel/power/swsusp.c
===================================================================
--- linux-2.6.16-rc3.orig/kernel/power/swsusp.c
+++ linux-2.6.16-rc3/kernel/power/swsusp.c
@@ -153,13 +153,11 @@ static int swsusp_swap_check(void) /* Th
{
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;
-
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/