Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210937
b: refs/heads/master
c: 433abed
h: refs/heads/master
i:
  210935: 1add4aa
v: v3
  • Loading branch information
Naoya Horiguchi authored and Linus Torvalds committed Sep 24, 2010
1 parent 0bc4074 commit 81a3678
Show file tree
Hide file tree
Showing 2 changed files with 8 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: bcf835e52e0974b2e2e056b190dd66372b28cfce
refs/heads/master: 433abed6c6f76ca079a9564f2a1a51fd28ebe0ca
13 changes: 7 additions & 6 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1564,13 +1564,14 @@ static void __hugepage_set_anon_rmap(struct page *page,
struct vm_area_struct *vma, unsigned long address, int exclusive)
{
struct anon_vma *anon_vma = vma->anon_vma;

BUG_ON(!anon_vma);
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;
if (!exclusive)
anon_vma = anon_vma->root;

anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON;
page->mapping = (struct address_space *) anon_vma;
page->index = linear_page_index(vma, address);
Expand Down

0 comments on commit 81a3678

Please sign in to comment.