diff options
author | Tejun Heo <tj@kernel.org> | 2013-05-24 10:55:38 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-05-24 10:55:38 +0900 |
commit | d591fb56618f4f93160b477dfa25bbb1e31b0e85 (patch) | |
tree | f84721d586f927bb83ac9a1ae69cfc42b4380f3a /lib | |
parent | 75501a6d59e989e5c286716e5b3b66ace4660e83 (diff) |
device_cgroup: simplify cgroup tree walk in propagate_exception()
During a config change, propagate_exception() needs to traverse the
subtree to update config on the subtree. Because such config updates
need to allocate memory, it couldn't directly use
cgroup_for_each_descendant_pre() which required the whole iteration to
be contained in a single RCU read critical section. To work around
the limitation, propagate_exception() built a linked list of
descendant cgroups while read-locking RCU and then walked the list
afterwards, which is safe as the whole iteration is protected by
devcgroup_mutex. This works but is cumbersome.
With the recent updates, cgroup iterators now allow dropping RCU read
lock while iteration is in progress making this workaround no longer
necessary. This patch replaces dev_cgroup->propagate_pending list and
get_online_devcg() with direct cgroup_for_each_descendant_pre() walk.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Aristeu Rozanski <aris@redhat.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions