OSDN Git Service

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)
commitbb523b406c849eef8f265a07cd7f320f1f177743
tree049910999167cc360d3fe794e1c9944fd9b50285
parent0c8eb2884a42d992c7726539328b7d3568f22143
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