diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2016-07-26 15:25:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 16:19:19 -0700 |
commit | dcddffd41d3f1d3bdcc1dce3f1cd142779b6d4c1 (patch) | |
tree | b7b545d38466ff7e0260573cba32c9cabd3fd1a2 /mm/gup.c | |
parent | 6fb8ddfc455ca82a3ce674f54298cd20f27ca518 (diff) | |
download | linux-stable-dcddffd41d3f1d3bdcc1dce3f1cd142779b6d4c1.tar.gz linux-stable-dcddffd41d3f1d3bdcc1dce3f1cd142779b6d4c1.tar.bz2 linux-stable-dcddffd41d3f1d3bdcc1dce3f1cd142779b6d4c1.zip |
mm: do not pass mm_struct into handle_mm_fault
We always have vma->vm_mm around.
Link: http://lkml.kernel.org/r/1466021202-61880-8-git-send-email-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -352,7 +352,6 @@ unmap: static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) { - struct mm_struct *mm = vma->vm_mm; unsigned int fault_flags = 0; int ret; @@ -377,7 +376,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, fault_flags |= FAULT_FLAG_TRIED; } - ret = handle_mm_fault(mm, vma, address, fault_flags); + ret = handle_mm_fault(vma, address, fault_flags); if (ret & VM_FAULT_ERROR) { if (ret & VM_FAULT_OOM) return -ENOMEM; @@ -692,7 +691,7 @@ retry: if (!vma_permits_fault(vma, fault_flags)) return -EFAULT; - ret = handle_mm_fault(mm, vma, address, fault_flags); + ret = handle_mm_fault(vma, address, fault_flags); major |= ret & VM_FAULT_MAJOR; if (ret & VM_FAULT_ERROR) { if (ret & VM_FAULT_OOM) |