From: Tejun Heo Date: Fri, 9 Nov 2012 17:12:30 +0000 (-0800) Subject: cgroup_freezer: add ->post_create() and ->pre_destroy() and track online state X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~57^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5300a9b3482b6d9c32de6d5f4eaeab0fbafa70a8;p=pandora-kernel.git cgroup_freezer: add ->post_create() and ->pre_destroy() and track online state A cgroup is online and visible to iteration between ->post_create() and ->pre_destroy(). This patch introduces CGROUP_FREEZER_ONLINE and toggles it from the newly added freezer_post_create() and freezer_pre_destroy() while holding freezer->lock such that a cgroup_freezer can be reilably distinguished to be online. This will be used by full hierarchy support. ONLINE test is added to freezer_apply_state() but it currently doesn't make any difference as freezer_write() can only be called for an online cgroup. Adjusting system_freezing_cnt on destruction is moved from freezer_destroy() to the new freezer_pre_destroy() for consistency. This patch doesn't introduce any noticeable behavior change. Signed-off-by: Tejun Heo Reviewed-by: KAMEZAWA Hiroyuki Reviewed-by: Michal Hocko --- Reading git-diff-tree failed