[CRIU] [PATCH 1/3] mm: expose the routines special_mapping_fault() and special_mapping_close()
Alexander Kartashov
alekskartashov at parallels.com
Mon Mar 10 03:00:46 PDT 2014
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
include/linux/mm.h | 4 ++++
mm/mmap.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f28f46e..6999a78 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1744,6 +1744,10 @@ extern int install_special_mapping(struct mm_struct *mm,
unsigned long addr, unsigned long len,
unsigned long flags, struct page **pages);
+extern int special_mapping_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
+extern void special_mapping_close(struct vm_area_struct *vma);
+
+
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
extern unsigned long mmap_region(struct file *file, unsigned long addr,
diff --git a/mm/mmap.c b/mm/mmap.c
index 20ff0c3..99a9ad8 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2870,8 +2870,8 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
}
-static int special_mapping_fault(struct vm_area_struct *vma,
- struct vm_fault *vmf)
+int special_mapping_fault(struct vm_area_struct *vma,
+ struct vm_fault *vmf)
{
pgoff_t pgoff;
struct page **pages;
@@ -2900,7 +2900,7 @@ static int special_mapping_fault(struct vm_area_struct *vma,
/*
* Having a close hook prevents vma merging regardless of flags.
*/
-static void special_mapping_close(struct vm_area_struct *vma)
+void special_mapping_close(struct vm_area_struct *vma)
{
}
--
1.7.9.5
More information about the CRIU
mailing list