Memory controller: make charging gfp mask aware
[linux-2.6.git] / mm / swapfile.c
index fddc4cc..35e00c3 100644 (file)
@@ -510,7 +510,7 @@ unsigned int count_swap_pages(int type, int free)
 static int unuse_pte(struct vm_area_struct *vma, pte_t *pte,
                unsigned long addr, swp_entry_t entry, struct page *page)
 {
-       if (mem_cgroup_charge(page, vma->vm_mm))
+       if (mem_cgroup_charge(page, vma->vm_mm, GFP_KERNEL))
                return -ENOMEM;
 
        inc_mm_counter(vma->vm_mm, anon_rss);