[PATCH 07/15] mm/z3fold: convert page to zpdesc in __release_z3fold_page

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

The main purpose is converting page->private to zpdesc->zppage_flag.

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

diff --git a/mm/z3fold.c b/mm/z3fold.c
index c3c740b42052..afdf21024f83 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -441,12 +441,12 @@ static inline struct z3fold_pool *zhdr_to_pool(struct z3fold_header *zhdr)

static void __release_z3fold_page(struct z3fold_header *zhdr, bool locked)
{
- struct page *page = virt_to_page(zhdr);
+ struct zpdesc *zpdesc = page_zpdesc(virt_to_page(zhdr));
struct z3fold_pool *pool = zhdr_to_pool(zhdr);

WARN_ON(!list_empty(&zhdr->buddy));
- set_bit(PAGE_STALE, &page->private);
- clear_bit(NEEDS_COMPACTING, &page->private);
+ set_bit(PAGE_STALE, &zpdesc->zppage_flag);
+ clear_bit(NEEDS_COMPACTING, &zpdesc->zppage_flag);
spin_lock(&pool->lock);
spin_unlock(&pool->lock);

--
2.43.0