binder: Remove incorrect comment about vm_insert_page() behavior
authorJann Horn <jannh@google.com>
Fri, 18 Oct 2019 15:39:46 +0000 (17:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Oct 2019 16:30:49 +0000 (12:30 -0400)
vm_insert_page() does increment the page refcount, and just to be sure,
I've confirmed it by printing page_count(page[0].page_ptr) before and after
vm_insert_page(). It's 1 before, 2 afterwards, as expected.

Fixes: a145dd411eb2 ("VM: add "vm_insert_page()" function")
Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20191018153946.128584-1-jannh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder_alloc.c

index d42a8b2..2faada3 100644 (file)
@@ -267,7 +267,6 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
                        alloc->pages_high = index + 1;
 
                trace_binder_alloc_page_end(alloc, index);
-               /* vm_insert_page does not seem to increment the refcount */
        }
        if (mm) {
                up_read(&mm->mmap_sem);