summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/cgroup.h2
-rw-r--r--kernel/cgroup/cgroup.c5
-rw-r--r--kernel/cgroup/freezer.c10
3 files changed, 3 insertions, 14 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 3e2efd412dfa..c0077adeea83 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -889,7 +889,7 @@ void cgroup_update_frozen(struct cgroup *cgrp);
void cgroup_freeze(struct cgroup *cgrp, bool freeze);
void cgroup_freezer_migrate_task(struct task_struct *task, struct cgroup *src,
struct cgroup *dst);
-void cgroup_freezer_frozen_exit(struct task_struct *task);
+
static inline bool cgroup_task_freeze(struct task_struct *task)
{
bool ret;
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 4fe9f7f1a3fa..327f37c9fdfa 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5926,9 +5926,8 @@ void cgroup_exit(struct task_struct *tsk)
css_set_move_task(tsk, cset, NULL, false);
cset->nr_tasks--;
- if (unlikely(cgroup_task_frozen(tsk)))
- cgroup_freezer_frozen_exit(tsk);
- else if (unlikely(cgroup_task_freeze(tsk)))
+ WARN_ON_ONCE(cgroup_task_frozen(tsk));
+ if (unlikely(cgroup_task_freeze(tsk)))
cgroup_update_frozen(task_dfl_cgroup(tsk));
spin_unlock_irq(&css_set_lock);
diff --git a/kernel/cgroup/freezer.c b/kernel/cgroup/freezer.c
index c321e768f8d3..8cf010680678 100644
--- a/kernel/cgroup/freezer.c
+++ b/kernel/cgroup/freezer.c
@@ -248,16 +248,6 @@ void cgroup_freezer_migrate_task(struct task_struct *task,
cgroup_freeze_task(task, test_bit(CGRP_FREEZE, &dst->flags));
}
-void cgroup_freezer_frozen_exit(struct task_struct *task)
-{
- struct cgroup *cgrp = task_dfl_cgroup(task);
-
- lockdep_assert_held(&css_set_lock);
-
- cgroup_dec_frozen_cnt(cgrp);
- cgroup_update_frozen(cgrp);
-}
-
void cgroup_freeze(struct cgroup *cgrp, bool freeze)
{
struct cgroup_subsys_state *css;