Skip to content

Commit 7817955

Browse files
rppttorvalds
authored andcommitted
mm/gup.c: fix follow_page_mask() kerneldoc comment
Commit df06b37 ("mm/gup: cache dev_pagemap while pinning pages") modified the signature of follow_page_mask() but left the parameter description behind. Update the description to make the code and comments agree again. While at it, update formatting of the return value description to match Documentation/doc-guide/kernel-doc.rst guidelines. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5040f8d commit 7817955

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mm/gup.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,17 @@ static struct page *follow_p4d_mask(struct vm_area_struct *vma,
385385
* @vma: vm_area_struct mapping @address
386386
* @address: virtual address to look up
387387
* @flags: flags modifying lookup behaviour
388-
* @page_mask: on output, *page_mask is set according to the size of the page
388+
* @ctx: contains dev_pagemap for %ZONE_DEVICE memory pinning and a
389+
* pointer to output page_mask
389390
*
390391
* @flags can have FOLL_ flags set, defined in <linux/mm.h>
391392
*
392-
* Returns the mapped (struct page *), %NULL if no mapping exists, or
393+
* When getting pages from ZONE_DEVICE memory, the @ctx->pgmap caches
394+
* the device's dev_pagemap metadata to avoid repeating expensive lookups.
395+
*
396+
* On output, the @ctx->page_mask is set according to the size of the page.
397+
*
398+
* Return: the mapped (struct page *), %NULL if no mapping exists, or
393399
* an error pointer if there is a mapping to something not represented
394400
* by a page descriptor (see also vm_normal_page()).
395401
*/

0 commit comments

Comments
 (0)