mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm: arch: make get_gate_vma take an mm_struct instead of a task_struct
Morally, the presence of a gate vma is more an attribute of a particular mm than a particular task. Moreover, dropping the dependency on task_struct will help make both existing and future operations on mm's more flexible and convenient. Signed-off-by: Stephen Wilson <[email protected]> Reviewed-by: Michel Lespinasse <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
375906f876
commit
31db58b3ab
10 changed files with 23 additions and 20 deletions
|
|
@ -237,7 +237,7 @@ long mlock_vma_pages_range(struct vm_area_struct *vma,
|
|||
|
||||
if (!((vma->vm_flags & (VM_DONTEXPAND | VM_RESERVED)) ||
|
||||
is_vm_hugetlb_page(vma) ||
|
||||
vma == get_gate_vma(current))) {
|
||||
vma == get_gate_vma(current->mm))) {
|
||||
|
||||
__mlock_vma_pages_range(vma, start, end, NULL);
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev,
|
|||
int lock = newflags & VM_LOCKED;
|
||||
|
||||
if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) ||
|
||||
is_vm_hugetlb_page(vma) || vma == get_gate_vma(current))
|
||||
is_vm_hugetlb_page(vma) || vma == get_gate_vma(current->mm))
|
||||
goto out; /* don't set VM_LOCKED, don't count */
|
||||
|
||||
pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT);
|
||||
|
|
|
|||
Loading…
Reference in a new issue