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] [day] [month] [year] [list]
Message-ID: <20220625092816.4856-2-linmiaohe@huawei.com>
Date:   Sat, 25 Jun 2022 17:28:10 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     <akpm@...ux-foundation.org>
CC:     <shy828301@...il.com>, <zokeefe@...gle.com>, <aarcange@...hat.com>,
        <willy@...radead.org>, <vbabka@...e.cz>, <dhowells@...hat.com>,
        <neilb@...e.de>, <apopple@...dia.com>, <david@...hat.com>,
        <surenb@...gle.com>, <peterx@...hat.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>, <linmiaohe@...wei.com>
Subject: [PATCH v2 1/7] mm/khugepaged: remove unneeded shmem_huge_enabled() check

If we reach here, khugepaged_scan_mm_slot() has already made sure that
hugepage is enabled for shmem, via its call to hugepage_vma_check().
Remove this duplicated check.

Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
Reviewed-by: Yang Shi <shy828301@...il.com>
Reviewed-by: Zach O'Keefe <zokeefe@...gle.com>
---
 mm/khugepaged.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index d8ebb60aae36..8a103e0f8d2b 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -2119,8 +2119,6 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
 		if (khugepaged_scan.address < hstart)
 			khugepaged_scan.address = hstart;
 		VM_BUG_ON(khugepaged_scan.address & ~HPAGE_PMD_MASK);
-		if (shmem_file(vma->vm_file) && !shmem_huge_enabled(vma))
-			goto skip;
 
 		while (khugepaged_scan.address < hend) {
 			int ret;
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ