cgroup: make cgroup_task_iter remember the cgroup being iterated
authorTejun Heo <tj@kernel.org>
Fri, 9 Aug 2013 00:11:26 +0000 (20:11 -0400)
committerTejun Heo <tj@kernel.org>
Fri, 9 Aug 2013 00:11:26 +0000 (20:11 -0400)
commitc59cd3d840b1b0a8f996cbbd9132128dcaabbeb9
treef2ad31b11b14c00cfaa5327a5a587fae56604866
parent0942eeeef68f9493c1bcb1a52baf612b73fcf9fb
cgroup: make cgroup_task_iter remember the cgroup being iterated

Currently all cgroup_task_iter functions require @cgrp to be passed
in, which is superflous and increases chance of usage error.  Make
cgroup_task_iter remember the cgroup being iterated and drop @cgrp
argument from next and end functions.

This patch doesn't introduce any behavior differences.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <bsingharora@gmail.com>
include/linux/cgroup.h
kernel/cgroup.c
kernel/cgroup_freezer.c
mm/memcontrol.c