[CRIU] [PATCH cr 01/11] mm: add a macros to determing private vma-s

Andrey Vagin avagin at openvz.org
Mon Oct 15 11:32:14 EDT 2012


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))
+
 #endif /* CR_RESTORER_H__ */
-- 
1.7.1



More information about the CRIU mailing list