[PATCH 03/15] mm/z3fold: use zpdesc in z3fold_page_putback

alexs
2024-06-21T05:42:21Z

Convert page to zpdesc in z3fold_page_putback function, and keep the
'page' parameter since the function hooks to page_putback, which is used
by other users.

Signed-off-by: Alex Shi <alexs@kernel.org>
---
mm/z3fold.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index b7f86c1b57a3..5cb156fc03be 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -1350,8 +1350,9 @@ static void z3fold_page_putback(struct page *page)
{
struct z3fold_header *zhdr;
struct z3fold_pool *pool;
+ struct zpdesc *zpdesc = page_zpdesc(page);

- zhdr = page_address(page);
+ zhdr = zpdesc_address(zpdesc);
pool = zhdr_to_pool(zhdr);

z3fold_page_lock(zhdr);
@@ -1362,7 +1363,7 @@ static void z3fold_page_putback(struct page *page)
return;
if (list_empty(&zhdr->buddy))
add_to_unbuddied(pool, zhdr);
- clear_bit(PAGE_CLAIMED, &page->private);
+ clear_bit(PAGE_CLAIMED, &zpdesc->zppage_flag);
z3fold_page_unlock(zhdr);
}

--
2.43.0