net/mlx4_en: Fix mixed PFC and Global pause user control requests
[pandora-kernel.git] / mm / page_cgroup.c
index 2d123f9..c7a7e01 100644 (file)
@@ -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: