From: Johannes Weiner Date: Mon, 24 May 2010 21:32:39 +0000 (-0700) Subject: mm: document follow_page() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=142762bd8d8c46345e79f0f68d3374564306972f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git mm: document follow_page() Signed-off-by: Johannes Weiner Cc: Dan Carpenter Cc: Rik van Riel Cc: Izik Eidus Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index 833952d8b74d..119b7ccdf39b 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1227,8 +1227,17 @@ int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, } EXPORT_SYMBOL_GPL(zap_vma_ptes); -/* - * Do a quick page-table lookup for a single page. +/** + * follow_page - look up a page descriptor from a user-virtual address + * @vma: vm_area_struct mapping @address + * @address: virtual address to look up + * @flags: flags modifying lookup behaviour + * + * @flags can have FOLL_ flags set, defined in + * + * Returns the mapped (struct page *), %NULL if no mapping exists, or + * an error pointer if there is a mapping to something not represented + * by a page descriptor (see also vm_normal_page()). */ struct page *follow_page(struct vm_area_struct *vma, unsigned long address, unsigned int flags)