Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217350
b: refs/heads/master
c: 4e1c197
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen committed Oct 8, 2010
1 parent 0ff6dca commit 8b17ce0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 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: 6a90181c7b0558b86179c1f5bcf3ab11f9d1bd30
refs/heads/master: 4e1c19750a8991c66e998a1915f2ad5c391bbd04
25 changes: 8 additions & 17 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,10 @@ void page_move_anon_rmap(struct page *page,
}

/**
* __page_set_anon_rmap - setup new anonymous rmap
* @page: the page to add the mapping to
* @vma: the vm area in which the mapping is added
* @address: the user virtual address mapped
* __page_set_anon_rmap - set up new anonymous rmap
* @page: Page to add to rmap
* @vma: VM area to add page to.
* @address: User virtual address of the mapping
* @exclusive: the page is exclusively owned by the current process
*/
static void __page_set_anon_rmap(struct page *page,
Expand All @@ -793,25 +793,16 @@ static void __page_set_anon_rmap(struct page *page,

BUG_ON(!anon_vma);

if (PageAnon(page))
return;

/*
* If the page isn't exclusively mapped into this vma,
* we must use the _oldest_ possible anon_vma for the
* page mapping!
*/
if (!exclusive) {
if (PageAnon(page))
return;
if (!exclusive)
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;
page->mapping = (struct address_space *) anon_vma;
Expand Down

0 comments on commit 8b17ce0

Please sign in to comment.