Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164403
b: refs/heads/master
c: 21333b2
h: refs/heads/master
i:
  164401: 3c5e8da
  164399: 0a32c19
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Sep 22, 2009
1 parent a49c1c6 commit 6334c86
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 28 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: f8af4da3b4c14e7267c4ffb952079af3912c51c5
refs/heads/master: 21333b2b66b805a360641568588e5a0bb06d9d1f
6 changes: 1 addition & 5 deletions trunk/include/linux/rmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,10 @@ void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned lon
void page_add_file_rmap(struct page *);
void page_remove_rmap(struct page *);

#ifdef CONFIG_DEBUG_VM
void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address);
#else
static inline void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address)
static inline void page_dup_rmap(struct page *page)
{
atomic_inc(&page->_mapcount);
}
#endif

/*
* Called from mm/vmscan.c to handle paging out
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
page = vm_normal_page(vma, addr, pte);
if (page) {
get_page(page);
page_dup_rmap(page, vma, addr);
page_dup_rmap(page);
rss[!!PageAnon(page)]++;
}

Expand Down
21 changes: 0 additions & 21 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,27 +710,6 @@ void page_add_file_rmap(struct page *page)
}
}

#ifdef CONFIG_DEBUG_VM
/**
* page_dup_rmap - duplicate pte mapping to a page
* @page: the page to add the mapping to
* @vma: the vm area being duplicated
* @address: the user virtual address mapped
*
* For copy_page_range only: minimal extract from page_add_file_rmap /
* page_add_anon_rmap, avoiding unnecessary tests (already checked) so it's
* quicker.
*
* The caller needs to hold the pte lock.
*/
void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address)
{
if (PageAnon(page))
__page_check_anon_rmap(page, vma, address);
atomic_inc(&page->_mapcount);
}
#endif

/**
* page_remove_rmap - take down pte mapping from a page
* @page: page to remove mapping from
Expand Down

0 comments on commit 6334c86

Please sign in to comment.