OSDN Git Service

mm: Pass 'address' to map to do_set_pte() and drop FAULT_FLAG_PREFAULT
authorWill Deacon <will@kernel.org>
Thu, 14 Jan 2021 15:24:19 +0000 (15:24 +0000)
committerWill Deacon <will@kernel.org>
Thu, 21 Jan 2021 12:50:18 +0000 (12:50 +0000)
commit9d3af4b448a119ac81378d3bc775f1c4a2a7ff36
treebff35a4882e293a9ba6aeb5ca3b307a74682a0cb
parent742d33729a0df11c9d8d4625dbf21dd20cdefd44
mm: Pass 'address' to map to do_set_pte() and drop FAULT_FLAG_PREFAULT

Rather than modifying the 'address' field of the 'struct vm_fault'
passed to do_set_pte(), leave that to identify the real faulting address
and pass in the virtual address to be mapped by the new pte as a
separate argument.

This makes FAULT_FLAG_PREFAULT redundant, as a prefault entry can be
identified simply by comparing the new address parameter with the
faulting address, so remove the redundant flag at the same time.

Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Will Deacon <will@kernel.org>
include/linux/mm.h
mm/filemap.c
mm/memory.c