]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: allow __get_user_pages() callers to avoid triggering page faults.
authorNick Alcock <nick.alcock@oracle.com>
Mon, 31 Mar 2014 14:22:56 +0000 (15:22 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jul 2015 14:29:36 +0000 (15:29 +0100)
commitc8fa47c8d869bfaaae1f99e607c64c3e258dd1c7
tree64942ed3d3f8b821ec4d0a4402b1983db00d5ace
parenta7a3548dfa1b6c384990700a2a463f7e6c173ee9
mm: allow __get_user_pages() callers to avoid triggering page faults.

Some callers of __get_userpages() would like to tentatively probe for
pages which may or may not be faulted in, in contexts in which faulting
is prohibited.  __get_user_pages() can return early before the fault is
complete, but cannot avoid the fault entirely.

This change introduces FOLL_NOFAULT, which causes an early return if a
fault would occur, without triggering a fault, and indicating (if the
caller requests it) that the call would block.

Orabug: 18412802
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Chuck Anderson <chuck.anderson@oracle.com>
include/linux/mm.h
mm/gup.c
mm/hugetlb.c