OSDN Git Service

cgroup: Set CGRP_RELEASABLE when adding to a cgroup
authorColin Cross <ccross@android.com>
Wed, 24 Nov 2010 05:37:03 +0000 (21:37 -0800)
committerIliyan Malchev <malchev@google.com>
Mon, 23 May 2011 22:43:51 +0000 (15:43 -0700)
commit3bc0d49a499be73e94f53b50420d217565757e6d
treecffc1f0b02c934619d4bd56aab7968faffeec033
parentc2d599be4d62be057cbcaaf8b73c407a0fb29bc2
cgroup: Set CGRP_RELEASABLE when adding to a cgroup

Changes the meaning of CGRP_RELEASABLE to be set on any cgroup
that has ever had a task or cgroup in it, or had css_get called
on it.  The bit is set in cgroup_attach_task, cgroup_create,
and __css_get.  It is not necessary to set the bit in
cgroup_fork, as the task is either in the root cgroup, in
which can never be released, or the task it was forked from
already set the bit in croup_attach_task.

Signed-off-by: Colin Cross <ccross@android.com>
include/linux/cgroup.h
kernel/cgroup.c