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: <20241018094151.3458-1-dev.jain@arm.com>
Date: Fri, 18 Oct 2024 15:11:51 +0530
From: Dev Jain <dev.jain@....com>
To: akpm@...ux-foundation.org,
	david@...hat.com,
	willy@...radead.org
Cc: ziy@...dia.com,
	ying.huang@...el.com,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	Dev Jain <dev.jain@....com>
Subject: [PATCH] mm: Remove redundant condition for THP folio

folio_test_pmd_mappable() implies folio_test_large(), therefore,
simplify the expression for is_thp.

Signed-off-by: Dev Jain <dev.jain@....com>
---
 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index df91248755e4..b43e7b105559 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1731,7 +1731,7 @@ static int migrate_pages_batch(struct list_head *from,
 
 		list_for_each_entry_safe(folio, folio2, from, lru) {
 			is_large = folio_test_large(folio);
-			is_thp = is_large && folio_test_pmd_mappable(folio);
+			is_thp = folio_test_pmd_mappable(folio);
 			nr_pages = folio_nr_pages(folio);
 
 			cond_resched();
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ