mm/compaction: remove unnecessary order check in try_to_compact_pages()
authorGanesh Mahendran <[email protected]>
Thu, 28 Jul 2016 22:45:13 +0000 (15:45 -0700)
committerLinus Torvalds <[email protected]>
Thu, 28 Jul 2016 23:07:41 +0000 (16:07 -0700)
The caller __alloc_pages_direct_compact() already checked (order == 0)
so there's no need to check again.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ganesh Mahendran <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Michal Nazarewicz <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/compaction.c

index 64df5fe052db656dcfd38999abdf561942dfd4c5..45eaa2a56517e0c2d72c972d5b2c701fb2f370c0 100644 (file)
@@ -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);