Commit a8534adb authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds

[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: default avatarRafael J. Wysocki <>
Cc: Pavel Machek <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ed3d021b
......@@ -153,13 +153,11 @@ static int swsusp_swap_check(void) /* This is called before saving image */
int i;
if (!swsusp_resume_device)
return -ENODEV;
for (i = 0; i < MAX_SWAPFILES; i++) {
if (!(swap_info[i].flags & SWP_WRITEOK))
if (is_resume_device(swap_info + i)) {
if (!swsusp_resume_device || is_resume_device(swap_info + i)) {
root_swap = i;
return 0;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment