From: Tejun Heo Date: Fri, 6 Dec 2013 20:11:56 +0000 (-0500) Subject: cgroup: make for_each_subsys() useable under cgroup_root_mutex X-Git-Tag: v3.14-rc1~136^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=780cd8b347b52584704438e599274f25c0a0fd13;p=pandora-kernel.git cgroup: make for_each_subsys() useable under cgroup_root_mutex We want to use for_each_subsys() in cgroupfs_root handling where only cgroup_root_mutex is held. The only way cgroup_subsys[] can change is through module load/unload, make cgroup_[un]load_subsys() grab cgroup_root_mutex too and update the lockdep annotation in for_each_subsys() to allow either cgroup_mutex or cgroup_root_mutex. * Lockdep annotation is moved from inner 'if' condition to outer 'for' init caluse. There's no reason to execute the assertion every loop. * Loop index @i is renamed to @ssid. Indices iterating through subsys will be [re]named to @ssid gradually. v2: cgroup_assert_mutex_or_root_locked() caused build failure if !CONFIG_LOCKEDP. Conditionalize its definition. The build failure was reported by kbuild test bot. Signed-off-by: Tejun Heo Acked-by: Li Zefan Cc: kbuild test robot --- Reading git-diff-tree failed