|
@@ -707,7 +707,6 @@ void page_add_file_rmap(struct page *page)
|
|
|
*/
|
|
|
void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address)
|
|
|
{
|
|
|
- BUG_ON(page_mapcount(page) == 0);
|
|
|
if (PageAnon(page))
|
|
|
__page_check_anon_rmap(page, vma, address);
|
|
|
atomic_inc(&page->_mapcount);
|
|
@@ -717,11 +716,10 @@ void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long
|
|
|
/**
|
|
|
* page_remove_rmap - take down pte mapping from a page
|
|
|
* @page: page to remove mapping from
|
|
|
- * @vma: the vm area in which the mapping is removed
|
|
|
*
|
|
|
* The caller needs to hold the pte lock.
|
|
|
*/
|
|
|
-void page_remove_rmap(struct page *page, struct vm_area_struct *vma)
|
|
|
+void page_remove_rmap(struct page *page)
|
|
|
{
|
|
|
if (atomic_add_negative(-1, &page->_mapcount)) {
|
|
|
/*
|
|
@@ -837,7 +835,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
|
|
|
dec_mm_counter(mm, file_rss);
|
|
|
|
|
|
|
|
|
- page_remove_rmap(page, vma);
|
|
|
+ page_remove_rmap(page);
|
|
|
page_cache_release(page);
|
|
|
|
|
|
out_unmap:
|
|
@@ -952,7 +950,7 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount,
|
|
|
if (pte_dirty(pteval))
|
|
|
set_page_dirty(page);
|
|
|
|
|
|
- page_remove_rmap(page, vma);
|
|
|
+ page_remove_rmap(page);
|
|
|
page_cache_release(page);
|
|
|
dec_mm_counter(mm, file_rss);
|
|
|
(*mapcount)--;
|