]> git.baikalelectronics.ru Git - kernel.git/commit
gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 2 Aug 2021 11:44:20 +0000 (13:44 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 18 Oct 2021 14:33:03 +0000 (16:33 +0200)
commita637c65de3f18a8d638711c2bf8a27e20fae19ef
tree049910999167cc360d3fe794e1c9944fd9b50285
parenta8a9f3dca3f5e6bb7f723f11d1f573e29005c005
gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}

Turn fault_in_pages_{readable,writeable} into versions that return the
number of bytes not faulted in, similar to copy_to_user, instead of
returning a non-zero value when any of the requested pages couldn't be
faulted in.  This supports the existing users that require all pages to
be faulted in as well as new users that are happy if any pages can be
faulted in.

Rename the functions to fault_in_{readable,writeable} to make sure
this change doesn't silently break things.

Neither of these functions is entirely trivial and it doesn't seem
useful to inline them, so move them to mm/gup.c.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
arch/powerpc/kernel/kvm.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c
arch/x86/kernel/fpu/signal.c
drivers/gpu/drm/armada/armada_gem.c
fs/btrfs/ioctl.c
include/linux/pagemap.h
lib/iov_iter.c
mm/filemap.c
mm/gup.c