mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
pagewalk: add locking-rule comments
Originally, walk_hugetlb_range() didn't require a caller take any lock.
But commit d33b9f45bd ("mm: hugetlb: fix hugepage memory leak in
walk_page_range") changed its rule. Because it added find_vma() call in
walk_hugetlb_range().
Any locking-rule change commit should write a doc too.
[[email protected]: clarify comment]
Signed-off-by: KOSAKI Motohiro <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: Hiroyuki Kamezawa <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Matt Mackall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6c6d528043
commit
c27fe4c894
2 changed files with 5 additions and 0 deletions
|
|
@ -181,6 +181,9 @@ static int walk_hugetlb_range(struct vm_area_struct *vma,
|
|||
*
|
||||
* If any callback returns a non-zero value, the walk is aborted and
|
||||
* the return value is propagated back to the caller. Otherwise 0 is returned.
|
||||
*
|
||||
* walk->mm->mmap_sem must be held for at least read if walk->hugetlb_entry
|
||||
* is !NULL.
|
||||
*/
|
||||
int walk_page_range(unsigned long addr, unsigned long end,
|
||||
struct mm_walk *walk)
|
||||
|
|
|
|||
Loading…
Reference in a new issue