diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-07-25 20:12:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:57:08 -0400 |
commit | c27fe4c8942d3ca715986f79cc26f44608d7d9fb (patch) | |
tree | d954d0417c941f5e51cf029608311ef04acd9575 /mm/pagewalk.c | |
parent | 6c6d5280431544e4036886ea74e3334a98bc5f96 (diff) |
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.
[akpm@linux-foundation.org: clarify comment]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/pagewalk.c')
-rw-r--r-- | mm/pagewalk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index ee4ff87c58c1..f7929406e776 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c | |||
@@ -181,6 +181,9 @@ static int walk_hugetlb_range(struct vm_area_struct *vma, | |||
181 | * | 181 | * |
182 | * If any callback returns a non-zero value, the walk is aborted and | 182 | * If any callback returns a non-zero value, the walk is aborted and |
183 | * the return value is propagated back to the caller. Otherwise 0 is returned. | 183 | * the return value is propagated back to the caller. Otherwise 0 is returned. |
184 | * | ||
185 | * walk->mm->mmap_sem must be held for at least read if walk->hugetlb_entry | ||
186 | * is !NULL. | ||
184 | */ | 187 | */ |
185 | int walk_page_range(unsigned long addr, unsigned long end, | 188 | int walk_page_range(unsigned long addr, unsigned long end, |
186 | struct mm_walk *walk) | 189 | struct mm_walk *walk) |