diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 0f77608e89ca..85fd2d86d23f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6843,6 +6843,7 @@ static void uncharge_page(struct page *page, struct uncharge_gather *ug) uncharge_gather_clear(ug); } ug->memcg = page_memcg(page); + ug->dummy_page = page; /* pairs with css_put in uncharge_batch */ css_get(&ug->memcg->css); @@ -6856,7 +6857,6 @@ static void uncharge_page(struct page *page, struct uncharge_gather *ug) else ug->pgpgout++; - ug->dummy_page = page; page->memcg_data = 0; css_put(&ug->memcg->css); }