aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Mahendran <[email protected]>2016-07-28 15:45:13 -0700
committerLinus Torvalds <[email protected]>2016-07-28 16:07:41 -0700
commitb2b331f966086d5741440d9140c39b7ad5ab3862 (patch)
treedcf9fbecf430a53a9d6c80c485443442df9fca3a
parent55779ec759ccc3c12b917b3712a7716e1140c652 (diff)
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/[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]>
-rw-r--r--mm/compaction.c2
1 files changed, 1 insertions, 1 deletions
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);