A isolated page shouldn't be recharged by memcg since the memcg
migration isn't possible at the time.
So remove unnecessary regetting.

Thanks to Alexander Duyck for pointing this out.

Signed-off-by: Alex Shi <alex....@linux.alibaba.com>
Acked-by: Hugh Dickins <hu...@google.com>
Cc: Alexander Duyck <alexander.h.du...@linux.intel.com>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Konstantin Khlebnikov <khlebni...@yandex-team.ru>
Cc: Michal Hocko <mho...@kernel.org>
Cc: Hugh Dickins <hu...@google.com>
Cc: Johannes Weiner <han...@cmpxchg.org>
Cc: linux...@kvack.org
Cc: linux-kernel@vger.kernel.org
Cc: cgro...@vger.kernel.org
---
 mm/vmscan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 42bac12aacb4..845733afccde 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1887,7 +1887,8 @@ static unsigned noinline_for_stack 
move_pages_to_lru(struct lruvec *lruvec,
                        continue;
                }
 
-               lruvec = mem_cgroup_page_lruvec(page, pgdat);
+               VM_BUG_ON_PAGE(mem_cgroup_page_lruvec(page, page_pgdat(page))
+                                                       != lruvec, page);
                lru = page_lru(page);
                nr_pages = thp_nr_pages(page);
 
-- 
1.8.3.1

Reply via email to