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: <1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com>
Date:	Wed, 15 Jun 2016 14:52:48 +0800
From:	Ganesh Mahendran <opensource.ganesh@...il.com>
To:	akpm@...ux-foundation.org, vbabka@...e.cz, iamjoonsoo.kim@....com,
	mhocko@...e.com, mina86@...a86.com, minchan@...nel.org
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Ganesh Mahendran <opensource.ganesh@...il.com>
Subject: [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages()

The caller __alloc_pages_direct_compact() already check (order == 0).
So no need to check again.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
---
 mm/compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index fbb7b38..500acda 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1687,7 +1687,7 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order,
 	*contended = COMPACT_CONTENDED_NONE;
 
 	/* Check if the GFP flags allow compaction */
-	if (!order || !may_enter_fs || !may_perform_io)
+	if (!may_enter_fs || !may_perform_io)
 		return COMPACT_SKIPPED;
 
 	trace_mm_compaction_try_to_compact_pages(order, gfp_mask, mode);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ