diff options
author | Miaohe Lin <[email protected]> | 2022-04-28 23:16:07 -0700 |
---|---|---|
committer | akpm <[email protected]> | 2022-04-28 23:16:07 -0700 |
commit | b75454e10101af3a11b24ca7e14917b6c8874688 (patch) | |
tree | b3cbc05790d201cfedf2712c51d7cc88728b2f5a | |
parent | 5202978b48786703a6cec94596067b3fafd1f734 (diff) |
mm/migration: remove unneeded local variable page_lru
We can use page_is_file_lru() directly to help account the isolated pages
to simplify the code a bit.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Cc: Alistair Popple <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: "Huang, Ying" <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Zi Yan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/migrate.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 7d698caf333f..a993053cd620 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2013,7 +2013,6 @@ static struct page *alloc_misplaced_dst_page(struct page *page, static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page) { - int page_lru; int nr_pages = thp_nr_pages(page); int order = compound_order(page); @@ -2040,8 +2039,7 @@ static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page) if (isolate_lru_page(page)) return 0; - page_lru = page_is_file_lru(page); - mod_node_page_state(page_pgdat(page), NR_ISOLATED_ANON + page_lru, + mod_node_page_state(page_pgdat(page), NR_ISOLATED_ANON + page_is_file_lru(page), nr_pages); /* |