aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2018-10-17 11:18:31 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2018-10-19 17:25:09 +1100
commita08633ed4b3c62d370c8c238c8ca6317856c65d3 (patch)
tree4cc289616640e9d672af6b491f41151c237b8dde
parentc1cea06b579e5bbffb2e2ed6019af1a4d7369aa7 (diff)
download96b-common-a08633ed4b3c62d370c8c238c8ca6317856c65d3.tar.gz
drivers/android/binder_alloc.c: replace vm_insert_page with vmf_insert_page
There is a plan to replace vm_insert_page with new API vmf_insert_page. As part of it, converting vm_insert_page to use vmf_insert_page. Link: http://lkml.kernel.org/r/20180920172528.GA22480@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Tested-by: Todd Kjos <tkjos@google.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Arve Hjønnevåg <arve@android.com> Cc: Martijn Coenen <maco@android.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r--drivers/android/binder_alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 64fd96eada31..17368ef7dea5 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -238,6 +238,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
int ret;
bool on_lru;
size_t index;
+ vm_fault_t vmf;
index = (page_addr - alloc->buffer) / PAGE_SIZE;
page = &alloc->pages[index];
@@ -279,8 +280,8 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
}
user_page_addr =
(uintptr_t)page_addr + alloc->user_buffer_offset;
- ret = vm_insert_page(vma, user_page_addr, page[0].page_ptr);
- if (ret) {
+ vmf = vmf_insert_page(vma, user_page_addr, page[0].page_ptr);
+ if (vmf != VM_FAULT_NOPAGE) {
pr_err("%d: binder_alloc_buf failed to map page at %lx in userspace\n",
alloc->pid, user_page_addr);
goto err_vm_insert_page_failed;