X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=mm%2Fpage_cgroup.c;h=c7a7e01fffc9379421bd940aeb03e6ace08a7841;hp=2d123f94a8df49addd2ee3167d31861073da9f84;hb=9f249188a2927b7809ed790e4b568ea82039d919;hpb=80f01ca1fce2d5045b98f01989017767339b8700 diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index 2d123f94a8df..c7a7e01fffc9 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c @@ -160,6 +160,7 @@ static void free_page_cgroup(void *addr) sizeof(struct page_cgroup) * PAGES_PER_SECTION; BUG_ON(PageReserved(page)); + kmemleak_free(addr); free_pages_exact(addr, table_size); } } @@ -398,6 +399,9 @@ static int swap_cgroup_prepare(int type) if (!page) goto not_enough_page; ctrl->map[idx] = page; + + if (!(idx % SWAP_CLUSTER_MAX)) + cond_resched(); } return 0; not_enough_page: