From: Ganesh Mahendran Date: Thu, 28 Jul 2016 22:45:13 +0000 (-0700) Subject: mm/compaction: remove unnecessary order check in try_to_compact_pages() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2b331f966086d5741440d9140c39b7ad5ab3862;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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);