iov_iter: Introduce nofault flag to disable page faults
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 14 Apr 2022 22:28:52 +0000 (06:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 May 2022 15:22:33 +0000 (17:22 +0200)
commitf86f8d27840a97afc09077528048d39aab3e7df3
tree2bab3476742ccf0c4ab2b08a18012f9424126002
parent6e213bc61446d5aefcedb00251c275e30ce82ab5
iov_iter: Introduce nofault flag to disable page faults

commit 3337ab08d08b1a375f88471d9c8b1cac968cb054 upstream

Introduce a new nofault flag to indicate to iov_iter_get_pages not to
fault in user pages.

This is implemented by passing the FOLL_NOFAULT flag to get_user_pages,
which causes get_user_pages to fail when it would otherwise fault in a
page. We'll use the ->nofault flag to prevent iomap_dio_rw from faulting
in pages when page faults are not allowed.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/uio.h
lib/iov_iter.c