[CRIU] Re: [PATCH 5/5] pstree: Don't stack children with root task session in helpers

Cyrill Gorcunov gorcunov at openvz.org
Wed Oct 3 06:50:47 EDT 2012


On Wed, Oct 03, 2012 at 02:49:41PM +0400, Andrey Vagin wrote:
> On Wed, Oct 03, 2012 at 12:57:33PM +0400, Cyrill Gorcunov wrote:
> > 
> > There is no need to move children which sid is the same as
> > root task's sid to the helper task's list.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  pstree.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> 
> > diff --git a/pstree.c b/pstree.c
> > index 677c45e..6e91eff 100644
> > --- a/pstree.c
> > +++ b/pstree.c
> > @@ -253,7 +253,7 @@ int prepare_pstree_ids(void)
> >  		list_for_each_entry_safe_continue(child, tmp, &root_item->children, list) {
> >  			if (child->sid != helper->sid)
> >  				continue;
> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the first condition
> > -			if (child->sid == child->pid.virt)
> > +			if (child->sid == root_item->sid || child->sid == child->pid.virt)

Yeah, drop it, overdone.


More information about the CRIU mailing list