]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - mm/rmap.c
mm: clean up mm_counter
[mirror_ubuntu-zesty-kernel.git] / mm / rmap.c
index 278cd277bdec75cfb3de7bb01157ad2e092f622a..73d0472884c226fa6682350621b6eea142e2e1c9 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -815,9 +815,9 @@ int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
 
        if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
                if (PageAnon(page))
-                       dec_mm_counter(mm, anon_rss);
+                       dec_mm_counter(mm, MM_ANONPAGES);
                else
-                       dec_mm_counter(mm, file_rss);
+                       dec_mm_counter(mm, MM_FILEPAGES);
                set_pte_at(mm, address, pte,
                                swp_entry_to_pte(make_hwpoison_entry(page)));
        } else if (PageAnon(page)) {
@@ -839,7 +839,7 @@ int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
                                        list_add(&mm->mmlist, &init_mm.mmlist);
                                spin_unlock(&mmlist_lock);
                        }
-                       dec_mm_counter(mm, anon_rss);
+                       dec_mm_counter(mm, MM_ANONPAGES);
                } else if (PAGE_MIGRATION) {
                        /*
                         * Store the pfn of the page in a special migration
@@ -857,7 +857,7 @@ int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
                entry = make_migration_entry(page, pte_write(pteval));
                set_pte_at(mm, address, pte, swp_entry_to_pte(entry));
        } else
-               dec_mm_counter(mm, file_rss);
+               dec_mm_counter(mm, MM_FILEPAGES);
 
        page_remove_rmap(page);
        page_cache_release(page);
@@ -996,7 +996,7 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount,
 
                page_remove_rmap(page);
                page_cache_release(page);
-               dec_mm_counter(mm, file_rss);
+               dec_mm_counter(mm, MM_FILEPAGES);
                (*mapcount)--;
        }
        pte_unmap_unlock(pte - 1, ptl);