lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240621054658.1220796-6-alexs@kernel.org>
Date: Fri, 21 Jun 2024 13:46:45 +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 05/15] mm/z3fold: use zpdesc in init_z3fold_page

From: Alex Shi <alexs@...nel.org>

The func only uses page.private member, now use zpdesc.zppage_flag to
replace it.

Signed-off-by: Alex Shi <alexs@...nel.org>
---
 mm/z3fold.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index bfbc9f9fdfd4..cd1332243c62 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -320,15 +320,16 @@ static inline void free_handle(unsigned long handle, struct z3fold_header *zhdr)
 static struct z3fold_header *init_z3fold_page(struct page *page, bool headless,
 					struct z3fold_pool *pool, gfp_t gfp)
 {
-	struct z3fold_header *zhdr = page_address(page);
+	struct zpdesc *zpdesc = page_zpdesc(page);
+	struct z3fold_header *zhdr = zpdesc_address(zpdesc);
 	struct z3fold_buddy_slots *slots;
 
-	clear_bit(PAGE_HEADLESS, &page->private);
-	clear_bit(MIDDLE_CHUNK_MAPPED, &page->private);
-	clear_bit(NEEDS_COMPACTING, &page->private);
-	clear_bit(PAGE_STALE, &page->private);
-	clear_bit(PAGE_CLAIMED, &page->private);
-	clear_bit(PAGE_MIGRATED, &page->private);
+	clear_bit(PAGE_HEADLESS, &zpdesc->zppage_flag);
+	clear_bit(MIDDLE_CHUNK_MAPPED, &zpdesc->zppage_flag);
+	clear_bit(NEEDS_COMPACTING, &zpdesc->zppage_flag);
+	clear_bit(PAGE_STALE, &zpdesc->zppage_flag);
+	clear_bit(PAGE_CLAIMED, &zpdesc->zppage_flag);
+	clear_bit(PAGE_MIGRATED, &zpdesc->zppage_flag);
 	if (headless)
 		return zhdr;
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ