summaryrefslogtreecommitdiffstats
path: root/mm/swap.c
diff options
context:
space:
mode:
authorMuchun Song <songmuchun@bytedance.com>2021-06-28 19:37:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-06-29 10:53:50 -0700
commita984226f457f849eb9c4ce727eeaa3b5080597d8 (patch)
tree339912376e017cccacbcf5897a3a9cf25582e9e6 /mm/swap.c
parent2884b6b7eed4fc14c0630fb16e56a4c66c786d33 (diff)
downloadlinux-stable-a984226f457f849eb9c4ce727eeaa3b5080597d8.tar.gz
linux-stable-a984226f457f849eb9c4ce727eeaa3b5080597d8.tar.bz2
linux-stable-a984226f457f849eb9c4ce727eeaa3b5080597d8.zip
mm: memcontrol: remove the pgdata parameter of mem_cgroup_page_lruvec
All the callers of mem_cgroup_page_lruvec() just pass page_pgdat(page) as the 2nd parameter to it (except isolate_migratepages_block()). But for isolate_migratepages_block(), the page_pgdat(page) is also equal to the local variable of @pgdat. So mem_cgroup_page_lruvec() do not need the pgdat parameter. Just remove it to simplify the code. Link: https://lkml.kernel.org/r/20210417043538.9793-4-songmuchun@bytedance.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Roman Gushchin <guro@fb.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Xiongchun Duan <duanxiongchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r--mm/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c
index dfb48cf9c2c9..18cc9e63515b 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -313,7 +313,7 @@ void lru_note_cost(struct lruvec *lruvec, bool file, unsigned int nr_pages)
void lru_note_cost_page(struct page *page)
{
- lru_note_cost(mem_cgroup_page_lruvec(page, page_pgdat(page)),
+ lru_note_cost(mem_cgroup_page_lruvec(page),
page_is_file_lru(page), thp_nr_pages(page));
}