aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/process.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index e6e2739190b5..e59676f5811d 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -22,14 +22,6 @@
22 */ 22 */
23#define TIMEOUT (20 * HZ) 23#define TIMEOUT (20 * HZ)
24 24
25static inline int freezable(struct task_struct * p)
26{
27 if ((p == current) ||
28 (p->flags & PF_NOFREEZE))
29 return 0;
30 return 1;
31}
32
33static int try_to_freeze_tasks(bool sig_only) 25static int try_to_freeze_tasks(bool sig_only)
34{ 26{
35 struct task_struct *g, *p; 27 struct task_struct *g, *p;
@@ -52,10 +44,7 @@ static int try_to_freeze_tasks(bool sig_only)
52 todo = 0; 44 todo = 0;
53 read_lock(&tasklist_lock); 45 read_lock(&tasklist_lock);
54 do_each_thread(g, p) { 46 do_each_thread(g, p) {
55 if (frozen(p) || !freezable(p)) 47 if (p == current || !freeze_task(p, sig_only))
56 continue;
57
58 if (!freeze_task(p, sig_only))
59 continue; 48 continue;
60 49
61 /* 50 /*
@@ -181,9 +170,6 @@ void thaw_processes(void)
181 170
182 read_lock(&tasklist_lock); 171 read_lock(&tasklist_lock);
183 do_each_thread(g, p) { 172 do_each_thread(g, p) {
184 if (!freezable(p))
185 continue;
186
187 if (cgroup_freezing_or_frozen(p)) 173 if (cgroup_freezing_or_frozen(p))
188 continue; 174 continue;
189 175