From: Tejun Heo Date: Thu, 8 May 2014 01:31:17 +0000 (-0400) Subject: cgroup: introduce task_css_is_root() X-Git-Tag: omap-for-v3.16/fixes-against-rc1~169^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5024ae29cd285ce9e736776414da645d3a91828c;p=pandora-kernel.git cgroup: introduce task_css_is_root() Determining the css of a task usually requires RCU read lock as that's the only thing which keeps the returned css accessible till its reference is acquired; however, testing whether a task belongs to the root can be performed without dereferencing the returned css by comparing the returned pointer against the root one in init_css_set[] which never changes. Implement task_css_is_root() which can be invoked in any context. This will be used by the scheduled cgroup_freezer change. v2: cgroup no longer supports modular controllers. No need to export init_css_set. Pointed out by Li. Signed-off-by: Tejun Heo Acked-by: Li Zefan --- Reading git-diff-tree failed