[CRIU] Re: [PATCH cr 03/16] mm: add a macros to determing private vma-s

Andrew Vagin avagin at parallels.com
Tue Oct 30 14:27:01 EDT 2012


On Tue, Oct 30, 2012 at 08:10:50PM +0400, Pavel Emelyanov wrote:
> On 10/23/2012 02:02 PM, Andrey Vagin wrote:
> > Now this macros returns true only for anon | priv vmas.
> > It will be expanded to file | priv in a follow patch.
> > 
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> > ---
> >  include/restorer.h |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/restorer.h b/include/restorer.h
> > index 58a5c1f..93e4160 100644
> > --- a/include/restorer.h
> > +++ b/include/restorer.h
> > @@ -265,4 +265,7 @@ find_shmem(struct shmems *shmems, unsigned long shmid)
> >  	return NULL;
> >  }
> >  
> > +#define vma_priv(vma) (vma_entry_is(vma, VMA_AREA_REGULAR) &&	\
> > +			vma_entry_is(vma, VMA_ANON_PRIVATE))
> 
> Isn't the vma_entry_is(vma, VMA_AREA_REGULAR | VMA_ANON_PRIVATE) form better?
Yes, thanks.
> 
> > +
> >  #endif /* CR_RESTORER_H__ */
> > 
> 
> 


More information about the CRIU mailing list