[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240621054658.1220796-5-alexs@kernel.org>
Date: Fri, 21 Jun 2024 13:46:44 +0800
From: alexs@...nel.org
To: Vitaly Wool <vitaly.wool@...sulko.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
minchan@...nel.org,
willy@...radead.org,
senozhatsky@...omium.org,
david@...hat.com,
42.hyeyoo@...il.com
Cc: Alex Shi <alexs@...nel.org>
Subject: [PATCH 04/15] mm/z3fold: use zpdesc in get/put_z3fold_header funcs
From: Alex Shi <alexs@...nel.org>
Convert the get/put_z3fold_header funcs pair to use zpdesc.
Signed-off-by: Alex Shi <alexs@...nel.org>
---
mm/z3fold.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/z3fold.c b/mm/z3fold.c
index 5cb156fc03be..bfbc9f9fdfd4 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -254,9 +254,9 @@ static inline struct z3fold_header *get_z3fold_header(unsigned long handle)
locked = z3fold_page_trylock(zhdr);
read_unlock(&slots->lock);
if (locked) {
- struct page *page = virt_to_page(zhdr);
+ struct zpdesc *zpdesc = page_zpdesc(virt_to_page(zhdr));
- if (!test_bit(PAGE_MIGRATED, &page->private))
+ if (!test_bit(PAGE_MIGRATED, &zpdesc->zppage_flag))
break;
z3fold_page_unlock(zhdr);
}
@@ -271,9 +271,9 @@ static inline struct z3fold_header *get_z3fold_header(unsigned long handle)
static inline void put_z3fold_header(struct z3fold_header *zhdr)
{
- struct page *page = virt_to_page(zhdr);
+ struct zpdesc *zpdesc = page_zpdesc(virt_to_page(zhdr));
- if (!test_bit(PAGE_HEADLESS, &page->private))
+ if (!test_bit(PAGE_HEADLESS, &zpdesc->zppage_flag))
z3fold_page_unlock(zhdr);
}
--
2.43.0
Powered by blists - more mailing lists