aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup_freezer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup_freezer.c')
-rw-r--r--kernel/cgroup_freezer.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
index e9c856a265c9..5e6d26b66e88 100644
--- a/kernel/cgroup_freezer.c
+++ b/kernel/cgroup_freezer.c
@@ -275,25 +275,18 @@ static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
275 return num_cant_freeze_now ? -EBUSY : 0; 275 return num_cant_freeze_now ? -EBUSY : 0;
276} 276}
277 277
278static int unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer) 278static void unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
279{ 279{
280 struct cgroup_iter it; 280 struct cgroup_iter it;
281 struct task_struct *task; 281 struct task_struct *task;
282 282
283 cgroup_iter_start(cgroup, &it); 283 cgroup_iter_start(cgroup, &it);
284 while ((task = cgroup_iter_next(cgroup, &it))) { 284 while ((task = cgroup_iter_next(cgroup, &it))) {
285 int do_wake; 285 thaw_process(task);
286
287 task_lock(task);
288 do_wake = __thaw_process(task);
289 task_unlock(task);
290 if (do_wake)
291 wake_up_process(task);
292 } 286 }
293 cgroup_iter_end(cgroup, &it); 287 cgroup_iter_end(cgroup, &it);
294 freezer->state = CGROUP_THAWED;
295 288
296 return 0; 289 freezer->state = CGROUP_THAWED;
297} 290}
298 291
299static int freezer_change_state(struct cgroup *cgroup, 292static int freezer_change_state(struct cgroup *cgroup,
@@ -320,7 +313,7 @@ static int freezer_change_state(struct cgroup *cgroup,
320 } 313 }
321 /* state == FREEZING and goal_state == THAWED, so unfreeze */ 314 /* state == FREEZING and goal_state == THAWED, so unfreeze */
322 case CGROUP_FROZEN: 315 case CGROUP_FROZEN:
323 retval = unfreeze_cgroup(cgroup, freezer); 316 unfreeze_cgroup(cgroup, freezer);
324 break; 317 break;
325 default: 318 default:
326 break; 319 break;