From: Andrew Morton Date: Thu, 23 Mar 2006 10:59:58 +0000 (-0800) Subject: [PATCH] revert "swsusp: fix breakage with swap on lvm" X-Git-Tag: v2.6.17-rc1~1079 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2b322ce210aec74ae0d02938d3a01e29fe079469;p=linux-2.6-omap-h63xx.git [PATCH] revert "swsusp: fix breakage with swap on lvm" This was a temporary thing for 2.6.16. Cc: "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 2d9d08f72f7..4e90905f0e8 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c @@ -153,11 +153,13 @@ 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 (!swsusp_resume_device || is_resume_device(swap_info + i)) { + if (is_resume_device(swap_info + i)) { spin_unlock(&swap_lock); root_swap = i; return 0;