path: root/mm/mlock.c
diff options
authorHugh Dickins <>2009-09-21 17:03:31 -0700
committerLinus Torvalds <>2009-09-22 07:17:40 -0700
commit58fa879e1e640a1856f736b418984ebeccee1c95 (patch)
treedc37bce8379e29c46e79f105cc71d137b14965cf /mm/mlock.c
parenta13ea5b759645a0779edc6dbfec9abfd83220844 (diff)
mm: FOLL flags for GUP flags
__get_user_pages() has been taking its own GUP flags, then processing them into FOLL flags for follow_page(). Though oddly named, the FOLL flags are more widely used, so pass them to __get_user_pages() now. Sorry, VM flags, VM_FAULT flags and FAULT_FLAGs are still distinct. (The patch to __get_user_pages() looks peculiar, with both gup_flags and foll_flags: the gup_flags remain constant; but as before there's an exceptional case, out of scope of the patch, in which foll_flags per page have FOLL_WRITE masked off.) Signed-off-by: Hugh Dickins <> Cc: Rik van Riel <> Cc: KAMEZAWA Hiroyuki <> Cc: KOSAKI Motohiro <> Cc: Nick Piggin <> Cc: Mel Gorman <> Cc: Minchan Kim <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/mlock.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index e13918d4fc4f..22041aa9f5c1 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -166,9 +166,9 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
VM_BUG_ON(end > vma->vm_end);
- gup_flags = 0;
+ gup_flags = FOLL_TOUCH | FOLL_GET;
if (vma->vm_flags & VM_WRITE)
- gup_flags = GUP_FLAGS_WRITE;
+ gup_flags |= FOLL_WRITE;
while (nr_pages > 0) {
int i;