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-next>] [day] [month] [year] [list]
Message-ID: <20230825040848.1542-1-user@VERNHAO-MC1>
Date:   Fri, 25 Aug 2023 12:08:47 +0800
From:   Vern Hao <haoxing990@...il.com>
To:     akpm@...ux-foundation.org
Cc:     zhaoyang.huang@...soc.com, david@...hat.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, haoxing990@...il.com,
        Vern Hao <vernhao@...cent.com>
Subject: [PATCH] mm/vmscan: Use folio_migratetype() instead of get_pageblock_migratetype()

From: Vern Hao <vernhao@...cent.com>

In skip_cma(), we can use folio_migratetype() to replace get_pageblock_migratetype().

Fixes: 5da226dbfce3 ("mm: skip CMA pages when they are not available")
Signed-off-by: Vern Hao <vernhao@...cent.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 42e3893de2a7..d9e974b96144 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2271,7 +2271,7 @@ static bool skip_cma(struct folio *folio, struct scan_control *sc)
 {
 	return !current_is_kswapd() &&
 			gfp_migratetype(sc->gfp_mask) != MIGRATE_MOVABLE &&
-			get_pageblock_migratetype(&folio->page) == MIGRATE_CMA;
+			folio_migratetype(folio) == MIGRATE_CMA;
 }
 #else
 static bool skip_cma(struct folio *folio, struct scan_control *sc)
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ