ns_can_attach (nsproxy cgroup)

Grzegorz Nosek root at localdomain.pl
Tue Dec 16 15:08:08 PST 2008


On nie, gru 14, 2008 at 03:06:04 +0100, Grzegorz Nosek wrote:
> On sob, gru 13, 2008 at 03:03:52 +0800, Li Zefan wrote:
> > >  /**
> > > - * cgroup_is_descendant - see if @cgrp is a descendant of current task's cgrp
> > > + * cgroup_is_descendant - see if @cgrp is a descendant of @task's cgrp
> > >   * @cgrp: the cgroup in question
> > > + * @task: the task in question
> > > + * @subsys_id: cgroup subsystem id used to determine hierarchy; if negative,
> > > + * 		use get_first_subsys()
> > 
> > The last argument is redundant.
> > 
> > [...]
> > 
> > It makes no difference with:
> > 	if (!cgroup_is_descendant(new_cgroup, task, -1))
> > 
> > That's why we don't need argument 'subsys_id'.
> 
> Thanks, I thought so (the "first" subsys_id looked arbitrary to me) but not knowing
> the cgroup internals I wanted to preserve the original code as much as possible.
> Will update the patch.

As promised, here's the updated patch.



More information about the Containers mailing list