]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - mm/memcontrol.c
memcg: fix mapcount check in move charge code for anonymous page
[can-eth-gw-linux.git] / mm / memcontrol.c
index d0e57a3cda1899c156274d53e49e11be42957f87..5585dc3d36466189b0d89adf8e86f424372bdd23 100644 (file)
@@ -5075,7 +5075,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma,
                return NULL;
        if (PageAnon(page)) {
                /* we don't move shared anon */
-               if (!move_anon() || page_mapcount(page) > 2)
+               if (!move_anon() || page_mapcount(page) > 1)
                        return NULL;
        } else if (!move_file())
                /* we ignore mapcount for file pages */