mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mm: rename FOLL_MLOCK to FOLL_POPULATE
After commit a1fde08c74 ("VM: skip the stack guard page lookup in
get_user_pages only for mlock") FOLL_MLOCK has lost its original
meaning: we don't necessarily mlock the page if the flags is set -- we
also take VM_LOCKED into consideration.
Since we use the same codepath for __mm_populate(), let's rename
FOLL_MLOCK to FOLL_POPULATE.
Signed-off-by: Kirill A. Shutemov <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Acked-by: David Rientjes <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Cc: Rik van Riel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c21a6daf46
commit
84d33df279
4 changed files with 6 additions and 6 deletions
6
mm/gup.c
6
mm/gup.c
|
|
@ -92,7 +92,7 @@ retry:
|
|||
*/
|
||||
mark_page_accessed(page);
|
||||
}
|
||||
if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) {
|
||||
if ((flags & FOLL_POPULATE) && (vma->vm_flags & VM_LOCKED)) {
|
||||
/*
|
||||
* The preliminary mapping check is mainly to avoid the
|
||||
* pointless overhead of lock_page on the ZERO_PAGE
|
||||
|
|
@ -265,8 +265,8 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
|
|||
unsigned int fault_flags = 0;
|
||||
int ret;
|
||||
|
||||
/* For mlock, just skip the stack guard page. */
|
||||
if ((*flags & FOLL_MLOCK) &&
|
||||
/* For mm_populate(), just skip the stack guard page. */
|
||||
if ((*flags & FOLL_POPULATE) &&
|
||||
(stack_guard_page_start(vma, address) ||
|
||||
stack_guard_page_end(vma, address + PAGE_SIZE)))
|
||||
return -ENOENT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue