From b2b331f966086d5741440d9140c39b7ad5ab3862 Mon Sep 17 00:00:00 2001 From: Ganesh Mahendran Date: Thu, 28 Jul 2016 15:45:13 -0700 Subject: [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages() The caller __alloc_pages_direct_compact() already checked (order == 0) so there's no need to check again. Link: http://lkml.kernel.org/r/1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com Signed-off-by: Ganesh Mahendran Cc: Vlastimil Babka Cc: Joonsoo Kim Cc: Michal Hocko Cc: Michal Nazarewicz Cc: Minchan Kim Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 64df5fe052db..45eaa2a56517 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1681,7 +1681,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);