[Devel] Re: ns_can_attach (nsproxy cgroup)

Grzegorz Nosek root at localdomain.pl
Sun Dec 14 06:06:04 PST 2008


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.

Best regards,
 Grzegorz Nosek
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list