[CRIU] [PATCH v3 08/12] mem: make page_is_zero externally linked

Eugene Batalov eabatalov89 at gmail.com
Sun Aug 7 06:11:12 PDT 2016


We'll use it in anon shmem dedup so we need to have access
to it in shmem.c

Signed-off-by: Eugene Batalov <eabatalov89 at gmail.com>
---
 criu/include/mem.h | 2 ++
 criu/mem.c         | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/criu/include/mem.h b/criu/include/mem.h
index c4b1ffc..7f27454 100644
--- a/criu/include/mem.h
+++ b/criu/include/mem.h
@@ -2,6 +2,7 @@
 #define __CR_MEM_H__
 
 #include <stdbool.h>
+#include "asm/int.h"
 
 struct parasite_ctl;
 struct vm_area_list;
@@ -9,6 +10,7 @@ struct page_pipe;
 struct pstree_item;
 
 extern int task_reset_dirty_track(int pid);
+extern bool page_is_zero(u64 pme);
 extern bool page_in_parent(bool dirty);
 extern int prepare_mm_pid(struct pstree_item *i);
 extern int do_task_reset_dirty_track(int pid);
diff --git a/criu/mem.c b/criu/mem.c
index a63b5f6..d222535 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -113,7 +113,7 @@ static inline bool should_dump_page(VmaEntry *vmae, u64 pme)
 	return false;
 }
 
-static inline bool page_is_zero(u64 pme)
+bool page_is_zero(u64 pme)
 {
 	return (pme & PME_PFRAME_MASK) == kdat.zero_page_pfn;
 }
-- 
1.9.1



More information about the CRIU mailing list