diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index a4901e20735a29f1ef259ffb65b6594d28dafff5..d503d1a9007c9e1d01928c8e7effe5c9f0511753 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -27,6 +27,10 @@ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu) struct cgroup *parent; unsigned long flags; + /* nothing to do for root */ + if (!cgroup_parent(cgrp)) + return; + /* * Paired with the one in cgroup_rstat_cpu_pop_upated(). Either we * see NULL updated_next or they see our updated stat.