mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
userfaultfd: shmem: wire up shmem_mfill_zeropage_pte
For shmem VMAs we can use shmem_mfill_zeropage_pte for UFFDIO_ZEROPAGE Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Pavel Emelyanov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3217d3c79b
commit
8fb44e5403
1 changed files with 4 additions and 2 deletions
|
|
@ -389,11 +389,13 @@ static __always_inline ssize_t mfill_atomic_pte(struct mm_struct *dst_mm,
|
|||
err = mfill_zeropage_pte(dst_mm, dst_pmd,
|
||||
dst_vma, dst_addr);
|
||||
} else {
|
||||
err = -EINVAL; /* if zeropage is true return -EINVAL */
|
||||
if (likely(!zeropage))
|
||||
if (!zeropage)
|
||||
err = shmem_mcopy_atomic_pte(dst_mm, dst_pmd,
|
||||
dst_vma, dst_addr,
|
||||
src_addr, page);
|
||||
else
|
||||
err = shmem_mfill_zeropage_pte(dst_mm, dst_pmd,
|
||||
dst_vma, dst_addr);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue