[PATCH] revert "swsusp: fix breakage with swap on lvm"
authorAndrew Morton <akpm@osdl.org>
Thu, 23 Mar 2006 10:59:58 +0000 (02:59 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:07 +0000 (07:38 -0800)
This was a temporary thing for 2.6.16.

Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/power/swsusp.c

index 2d9d08f72f76f82cc57c3b1c06a46b4e8f2df820..4e90905f0e87ec1e394acc9c61251b0a2505b3ac 100644 (file)
@@ -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;