aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/rmap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 6bada99cd61c..0eb463ea88dd 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -352,6 +352,11 @@ void __init anon_vma_init(void)
352 * The page might have been remapped to a different anon_vma or the anon_vma 352 * The page might have been remapped to a different anon_vma or the anon_vma
353 * returned may already be freed (and even reused). 353 * returned may already be freed (and even reused).
354 * 354 *
355 * In case it was remapped to a different anon_vma, the new anon_vma will be a
356 * child of the old anon_vma, and the anon_vma lifetime rules will therefore
357 * ensure that any anon_vma obtained from the page will still be valid for as
358 * long as we observe page_mapped() [ hence all those page_mapped() tests ].
359 *
355 * All users of this function must be very careful when walking the anon_vma 360 * All users of this function must be very careful when walking the anon_vma
356 * chain and verify that the page in question is indeed mapped in it 361 * chain and verify that the page in question is indeed mapped in it
357 * [ something equivalent to page_mapped_in_vma() ]. 362 * [ something equivalent to page_mapped_in_vma() ].
@@ -421,7 +426,7 @@ struct anon_vma *page_lock_anon_vma(struct page *page)
421 /* 426 /*
422 * If the page is still mapped, then this anon_vma is still 427 * If the page is still mapped, then this anon_vma is still
423 * its anon_vma, and holding the mutex ensures that it will 428 * its anon_vma, and holding the mutex ensures that it will
424 * not go away, see __put_anon_vma(). 429 * not go away, see anon_vma_free().
425 */ 430 */
426 if (!page_mapped(page)) { 431 if (!page_mapped(page)) {
427 mutex_unlock(&root_anon_vma->mutex); 432 mutex_unlock(&root_anon_vma->mutex);