Re: [PATCH] sched: fix another race when reading /proc/sched_debug

KAMEZAWA Hiroyuki
2008-12-15T11:10:00Z

On Mon, 15 Dec 2008 11:43:49 +0100
Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> > + if (cgroup_is_removed(cgroup) || !cgroup->dentry)
> > + return;
> > cgroup_path(cgroup, path, sizeof(path));
> > + }
>
> Perhaps wrap that check in a cgroup_*() helper? That would avoid the
> duplication, be clearer and not open code the ->dentry assumption.
>
> cgroup_is_active() perhaps?
>

I vote for cgroup_is_populated().

Thx,
-Kame