summaryrefslogtreecommitdiff
path: root/mm/compaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 28a9596609fe..a86559910fd9 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2439,6 +2439,12 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
}
}
+ /* Stop if a page has been captured */
+ if (capc && capc->page) {
+ ret = COMPACT_SUCCESS;
+ break;
+ }
+
check_drain:
/*
* Has the migration scanner moved away from the previous
@@ -2457,12 +2463,6 @@ check_drain:
last_migrated_pfn = 0;
}
}
-
- /* Stop if a page has been captured */
- if (capc && capc->page) {
- ret = COMPACT_SUCCESS;
- break;
- }
}
out: