]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup_freezer: make freezer->state mask of flags
authorTejun Heo <tj@kernel.org>
Fri, 9 Nov 2012 17:12:30 +0000 (09:12 -0800)
committerTejun Heo <tj@kernel.org>
Fri, 9 Nov 2012 17:12:30 +0000 (09:12 -0800)
commit31839b88248101937003a76f48c908f543e33a2a
tree5e1a967eac89becbb0e480dc08906be20d3d3c2d
parent90a5bb97f218c19d46297358c839dac3ca3e89e3
cgroup_freezer: make freezer->state mask of flags

freezer->state was an enum value - one of THAWED, FREEZING and FROZEN.
As the scheduled full hierarchy support requires more than one
freezing condition, switch it to mask of flags.  If FREEZING is not
set, it's thawed.  FREEZING is set if freezing or frozen.  If frozen,
both FREEZING and FROZEN are set.  Now that tasks can be attached to
an already frozen cgroup, this also makes freezing condition checks
more natural.

This patch doesn't introduce any behavior change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
kernel/cgroup_freezer.c