From: Tejun Heo Date: Fri, 6 Dec 2013 20:11:55 +0000 (-0500) Subject: cgroup: css iterations and css_from_dir() are safe under cgroup_mutex X-Git-Tag: v3.14-rc1~136^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87fb54f1b5a447662854f176eeb1ba92d5ffc1d5;p=pandora-kernel.git cgroup: css iterations and css_from_dir() are safe under cgroup_mutex Currently, all css iterations and css_from_dir() require RCU read lock whether the caller is holding cgroup_mutex or not, which is unnecessarily restrictive. They are all safe to use under cgroup_mutex without holding RCU read lock. Factor out cgroup_assert_mutex_or_rcu_locked() from css_from_id() and apply it to all css iteration functions and css_from_dir(). v2: cgroup_assert_mutex_or_rcu_locked() definition doesn't need to be inside CONFIG_PROVE_RCU ifdef as rcu_lockdep_assert() is always defined and conditionalized. Move it outside of the ifdef block. Signed-off-by: Tejun Heo Acked-by: Li Zefan --- Reading git-diff-tree failed