userfaultfd: shmem: add shmem_mfill_zeropage_pte for userfaultfd support
authorMike Rapoport <[email protected]>
Wed, 6 Sep 2017 23:23:02 +0000 (16:23 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Sep 2017 00:27:28 +0000 (17:27 -0700)
commit8d10396342063c79e92c4e46215370ab7b988569
treec0cae3f4c634b760704f3fd8469f04213dc58fe4
parent0f0796945614b7523987f7eea32407421af4b1ee
userfaultfd: shmem: add shmem_mfill_zeropage_pte for userfaultfd support

shmem_mfill_zeropage_pte is the low level routine that implements the
userfaultfd UFFDIO_ZEROPAGE command.  Since for shmem mappings zero
pages are always allocated and accounted, the new method is a slight
extension of the existing shmem_mcopy_atomic_pte.

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]>
include/linux/shmem_fs.h
mm/shmem.c