cgroup/rstat: check updated_next only for root
authorWei Yang <richard.weiyang@gmail.com>
Sat, 25 Dec 2021 00:09:32 +0000 (00:09 +0000)
committerTejun Heo <tj@kernel.org>
Thu, 6 Jan 2022 21:50:34 +0000 (11:50 -1000)
commitf5f60d235e7058da13a643c33fc7599c05ec0b73
tree3ba3b73e84ad6835583c2548fb52021cf0374fd0
parent0da41f7348fff193d01d031ce255088fa98324b7
cgroup/rstat: check updated_next only for root

After commit dc26532aed0a ("cgroup: rstat: punt root-level optimization to
individual controllers"), each rstat on updated_children list has its
->updated_next not NULL.

This means we can remove the check on ->updated_next, if we make sure
the subtree from @root is on list, which could be done by checking
updated_next for root.

tj: Coding style fixes.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/rstat.c