[patch 88/96] drivers/android/binder_alloc.c: replace vm_insert_page with vmf_insert_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Souptick Joarder <jrdr.linux@xxxxxxxxx>
Subject: 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@xxxxxxxxx>
Tested-by: Todd Kjos <tkjos@xxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Arve Hjønnevåg <arve@xxxxxxxxxxx>
Cc: Martijn Coenen <maco@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/android/binder_alloc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/android/binder_alloc.c~android-binder-replace-vm_insert_page-with-vmf_insert_page
+++ a/drivers/android/binder_alloc.c
@@ -238,6 +238,7 @@ static int binder_update_page_range(stru
 		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(stru
 		}
 		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;
_



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux