aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-22 08:09:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-22 08:09:49 -0700
commite1fd9cc9cbb5ac6465601833ea1cc5d6d376a155 (patch)
treec7f539824b7dee42628538ed9f5e01fd6a837117 /mm
parent2b2e2a3615d022106c0300241219c1d952208b3d (diff)
downloadhistory-e1fd9cc9cbb5ac6465601833ea1cc5d6d376a155.tar.gz
[PATCH] rmap 37 page_add_anon_rmap vma
From: Hugh Dickins <hugh@veritas.com> Silly final patch for anonmm rmap: change page_add_anon_rmap's mm arg to vma arg like anon_vma rmap, to smooth the transition between them.
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c8
-rw-r--r--mm/rmap.c6
-rw-r--r--mm/swapfile.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 7e77374e4b8cb5..d03092ad5bce46 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1088,7 +1088,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct * vma,
page_remove_rmap(old_page);
break_cow(vma, new_page, address, page_table);
lru_cache_add_active(new_page);
- page_add_anon_rmap(new_page, mm, address);
+ page_add_anon_rmap(new_page, vma, address);
/* Free the old page.. */
new_page = old_page;
@@ -1366,7 +1366,7 @@ static int do_swap_page(struct mm_struct * mm,
flush_icache_page(vma, page);
set_pte(page_table, pte);
- page_add_anon_rmap(page, mm, address);
+ page_add_anon_rmap(page, vma, address);
if (write_access || mremap_moved_anon_rmap(page, address)) {
if (do_wp_page(mm, vma, address,
@@ -1425,7 +1425,7 @@ do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
vma);
lru_cache_add_active(page);
mark_page_accessed(page);
- page_add_anon_rmap(page, mm, addr);
+ page_add_anon_rmap(page, vma, addr);
}
set_pte(page_table, entry);
@@ -1532,7 +1532,7 @@ retry:
set_pte(page_table, entry);
if (anon) {
lru_cache_add_active(new_page);
- page_add_anon_rmap(new_page, mm, address);
+ page_add_anon_rmap(new_page, vma, address);
} else
page_add_file_rmap(new_page);
pte_unmap(page_table);
diff --git a/mm/rmap.c b/mm/rmap.c
index 6573c9d94b45f6..2b2e32620a0c9c 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -365,15 +365,15 @@ int page_referenced(struct page *page)
/**
* page_add_anon_rmap - add pte mapping to an anonymous page
* @page: the page to add the mapping to
- * @mm: the mm in which the mapping is added
+ * @vma: the vm area in which the mapping is added
* @address: the user virtual address mapped
*
* The caller needs to hold the mm->page_table_lock.
*/
void page_add_anon_rmap(struct page *page,
- struct mm_struct *mm, unsigned long address)
+ struct vm_area_struct *vma, unsigned long address)
{
- struct anonmm *anonmm = mm->anonmm;
+ struct anonmm *anonmm = vma->vm_mm->anonmm;
BUG_ON(PageReserved(page));
diff --git a/mm/swapfile.c b/mm/swapfile.c
index e5f7e8829aa8ad..ce15af5ebc1216 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -433,7 +433,7 @@ unuse_pte(struct vm_area_struct *vma, unsigned long address, pte_t *dir,
vma->vm_mm->rss++;
get_page(page);
set_pte(dir, pte_mkold(mk_pte(page, vma->vm_page_prot)));
- page_add_anon_rmap(page, vma->vm_mm, address);
+ page_add_anon_rmap(page, vma, address);
swap_free(entry);
}