[PATCH] swsusp: Make userland suspend work on SMP again
Rafael J. Wysocki [Sat, 7 Oct 2006 05:19:44 +0000 (22:19 -0700)]
Unfortunately one of the recent changes in swsusp has broken the userland
suspend on SMP.  Fix it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

kernel/power/user.c

index 72825c8..93b5dd2 100644 (file)
@@ -145,10 +145,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                        error = freeze_processes();
                        if (error) {
                                thaw_processes();
+                               enable_nonboot_cpus();
                                error = -EBUSY;
                        }
                }
-               enable_nonboot_cpus();
                up(&pm_sem);
                if (!error)
                        data->frozen = 1;