Commit 8ea2f86c authored by Miaohe Lin's avatar Miaohe Lin Committed by akpm

mm/z3fold: remove unneeded page_mapcount_reset and ClearPagePrivate

Page->page_type and PagePrivate are not used in z3fold.  We should remove
these confusing unneeded operations.  The z3fold do these here is due to
referring to zsmalloc's migration code which does need these operations.

Link: https://lkml.kernel.org/r/20220308134311.59086-5-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarVitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent ed0e5dca
...@@ -420,7 +420,6 @@ static void free_z3fold_page(struct page *page, bool headless) ...@@ -420,7 +420,6 @@ static void free_z3fold_page(struct page *page, bool headless)
__ClearPageMovable(page); __ClearPageMovable(page);
unlock_page(page); unlock_page(page);
} }
ClearPagePrivate(page);
__free_page(page); __free_page(page);
} }
...@@ -1635,7 +1634,6 @@ static int z3fold_page_migrate(struct address_space *mapping, struct page *newpa ...@@ -1635,7 +1634,6 @@ static int z3fold_page_migrate(struct address_space *mapping, struct page *newpa
INIT_LIST_HEAD(&new_zhdr->buddy); INIT_LIST_HEAD(&new_zhdr->buddy);
new_mapping = page_mapping(page); new_mapping = page_mapping(page);
__ClearPageMovable(page); __ClearPageMovable(page);
ClearPagePrivate(page);
get_page(newpage); get_page(newpage);
z3fold_page_lock(new_zhdr); z3fold_page_lock(new_zhdr);
...@@ -1655,7 +1653,6 @@ static int z3fold_page_migrate(struct address_space *mapping, struct page *newpa ...@@ -1655,7 +1653,6 @@ static int z3fold_page_migrate(struct address_space *mapping, struct page *newpa
queue_work_on(new_zhdr->cpu, pool->compact_wq, &new_zhdr->work); queue_work_on(new_zhdr->cpu, pool->compact_wq, &new_zhdr->work);
page_mapcount_reset(page);
clear_bit(PAGE_CLAIMED, &page->private); clear_bit(PAGE_CLAIMED, &page->private);
put_page(page); put_page(page);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment