Skip to content

Commit 142762b

Browse files
hnaztorvalds
authored andcommitted
mm: document follow_page()
Signed-off-by: Johannes Weiner <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Izik Eidus <[email protected]> Cc: Andrea Arcangeli <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 58a9d3d commit 142762b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

mm/memory.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,17 @@ int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
12271227
}
12281228
EXPORT_SYMBOL_GPL(zap_vma_ptes);
12291229

1230-
/*
1231-
* Do a quick page-table lookup for a single page.
1230+
/**
1231+
* follow_page - look up a page descriptor from a user-virtual address
1232+
* @vma: vm_area_struct mapping @address
1233+
* @address: virtual address to look up
1234+
* @flags: flags modifying lookup behaviour
1235+
*
1236+
* @flags can have FOLL_ flags set, defined in <linux/mm.h>
1237+
*
1238+
* Returns the mapped (struct page *), %NULL if no mapping exists, or
1239+
* an error pointer if there is a mapping to something not represented
1240+
* by a page descriptor (see also vm_normal_page()).
12321241
*/
12331242
struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
12341243
unsigned int flags)

0 commit comments

Comments
 (0)