Freezer: use __set_current_state in refrigerator
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 19 Jul 2007 08:47:33 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:42 +0000 (10:04 -0700)
Use __set_current_state() as appropriate in refrigerator() instead of
accessing current->state directly.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/process.c

index e1bcdedd1464046204e4347489803d990547cc0c..9b5301c73b8331ad66779ca6f78cb8dcbe6b13f8 100644 (file)
@@ -72,7 +72,7 @@ void refrigerator(void)
                schedule();
        }
        pr_debug("%s left refrigerator\n", current->comm);
-       current->state = save;
+       __set_current_state(save);
 }
 
 static void freeze_task(struct task_struct *p)