Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207235
b: refs/heads/master
c: 288468c
h: refs/heads/master
i:
  207233: 8e1c2c7
  207231: 4d730c3
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Aug 10, 2010
1 parent b13246b commit d5e0458
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba6f0ff3981e6263ab81ac512f04cca55b85ec81
refs/heads/master: 288468c334e98aacbb7e2fb8bde6bc1adcd55e05
18 changes: 12 additions & 6 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,20 @@ static void __page_set_anon_rmap(struct page *page,
* If the page isn't exclusively mapped into this vma,
* we must use the _oldest_ possible anon_vma for the
* page mapping!
*
* So take the last AVC chain entry in the vma, which is
* the deepest ancestor, and use the anon_vma from that.
*/
if (!exclusive) {
struct anon_vma_chain *avc;
avc = list_entry(vma->anon_vma_chain.prev, struct anon_vma_chain, same_vma);
anon_vma = avc->anon_vma;
if (PageAnon(page))
return;
anon_vma = anon_vma->root;
} else {
/*
* In this case, swapped-out-but-not-discarded swap-cache
* is remapped. So, no need to update page->mapping here.
* We convice anon_vma poitned by page->mapping is not obsolete
* because vma->anon_vma is necessary to be a family of it.
*/
if (PageAnon(page))
return;
}

anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON;
Expand Down

0 comments on commit d5e0458

Please sign in to comment.