summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-05-24 01:55:38 (GMT)
committerTejun Heo <tj@kernel.org>2013-05-24 01:55:38 (GMT)
commit75501a6d59e989e5c286716e5b3b66ace4660e83 (patch)
tree087af4f93bba2257ae139c5e4a0f3b850954ed81 /net
parent53fa5261747a90746531e8a1c81eeb78fedc2f71 (diff)
downloadlinux-75501a6d59e989e5c286716e5b3b66ace4660e83.tar.xz
cgroup: update iterators to use cgroup_next_sibling()
This patch converts cgroup_for_each_child(), cgroup_next_descendant_pre/post() and thus cgroup_for_each_descendant_pre/post() to use cgroup_next_sibling() instead of manually dereferencing ->sibling.next. The only reason the iterators couldn't allow dropping RCU read lock while iteration is in progress was because they couldn't determine the next sibling safely once RCU read lock is dropped. Using cgroup_next_sibling() removes that problem and enables all iterators to allow dropping RCU read lock in the middle. Comments are updated accordingly. This makes the iterators easier to use and will simplify controllers. Note that @cgroup argument is renamed to @cgrp in cgroup_for_each_child() because it conflicts with "struct cgroup" used in the new macro body. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Reviewed-by: Michal Hocko <mhocko@suse.cz>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions