[Suspend2][ 04/13] [Suspend2] Follow page routine.

Nigel Cunningham
2006-06-27T04:46:00Z

This variant of the follow page routine is used by Suspend2 to find
existing pages that belong to a process without changing anything in the
process.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

mm/memory.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 0ec7bc6..1021043 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -958,6 +958,15 @@ no_page_table:
return page;
}

+/*
+ * We want the address of the page for Suspend2 to mark as being in pageset1.
+ */
+
+struct page *suspend2_follow_page(struct mm_struct *mm, unsigned long address)
+{
+ return follow_page(mm->mmap, address, 0);
+}
+
int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, int len, int write, int force,
struct page **pages, struct vm_area_struct **vmas)