|
@@ -870,7 +870,7 @@ long get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
|
|
EXPORT_SYMBOL(get_user_pages_unlocked);
|
|
EXPORT_SYMBOL(get_user_pages_unlocked);
|
|
|
|
|
|
/*
|
|
/*
|
|
- * get_user_pages() - pin user pages in memory
|
|
|
|
|
|
+ * get_user_pages_remote() - pin user pages in memory
|
|
* @tsk: the task_struct to use for page fault accounting, or
|
|
* @tsk: the task_struct to use for page fault accounting, or
|
|
* NULL if faults are not to be recorded.
|
|
* NULL if faults are not to be recorded.
|
|
* @mm: mm_struct of target mm
|
|
* @mm: mm_struct of target mm
|
|
@@ -924,12 +924,29 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
|
|
* should use get_user_pages because it cannot pass
|
|
* should use get_user_pages because it cannot pass
|
|
* FAULT_FLAG_ALLOW_RETRY to handle_mm_fault.
|
|
* FAULT_FLAG_ALLOW_RETRY to handle_mm_fault.
|
|
*/
|
|
*/
|
|
-long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
|
- unsigned long start, unsigned long nr_pages, int write,
|
|
|
|
- int force, struct page **pages, struct vm_area_struct **vmas)
|
|
|
|
|
|
+long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
|
+ unsigned long start, unsigned long nr_pages,
|
|
|
|
+ int write, int force, struct page **pages,
|
|
|
|
+ struct vm_area_struct **vmas)
|
|
{
|
|
{
|
|
return __get_user_pages_locked(tsk, mm, start, nr_pages, write, force,
|
|
return __get_user_pages_locked(tsk, mm, start, nr_pages, write, force,
|
|
- pages, vmas, NULL, false, FOLL_TOUCH);
|
|
|
|
|
|
+ pages, vmas, NULL, false,
|
|
|
|
+ FOLL_TOUCH | FOLL_REMOTE);
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL(get_user_pages_remote);
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * This is the same as get_user_pages_remote() for the time
|
|
|
|
+ * being.
|
|
|
|
+ */
|
|
|
|
+long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
|
+ unsigned long start, unsigned long nr_pages,
|
|
|
|
+ int write, int force, struct page **pages,
|
|
|
|
+ struct vm_area_struct **vmas)
|
|
|
|
+{
|
|
|
|
+ return __get_user_pages_locked(tsk, mm, start, nr_pages,
|
|
|
|
+ write, force, pages, vmas, NULL, false,
|
|
|
|
+ FOLL_TOUCH);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(get_user_pages);
|
|
EXPORT_SYMBOL(get_user_pages);
|
|
|
|
|