[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180920172528.GA22480@jordon-HP-15-Notebook-PC>
Date: Thu, 20 Sep 2018 22:55:29 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: willy@...radead.org, gregkh@...uxfoundation.org, arve@...roid.com,
tkjos@...roid.com, maco@...roid.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org
Subject: [PATCH] android/binder: 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.
Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
---
drivers/android/binder_alloc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 64fd96e..17368ef 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;
--
1.9.1
Powered by blists - more mailing lists