aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2013-02-22 19:32:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 20:50:09 -0500
commit2a6f512412c7aecd04134721ea392cc496e6c017 (patch)
treec6074d60fcb8f0f8639946ba0598f168626d1542 /mm/page_alloc.c
parentffb22af5b7a5d6c04eec22253d6d368bc8e6cd3d (diff)
CMA: make putback_lru_pages() call conditional
As per documentation and other places calling putback_lru_pages(), putback_lru_pages() is called on error only. Make the CMA code behave consistently. [akpm@linux-foundation.org: remove a test-n-branch in the wrapup code] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d1107adf174a..804cc62ab72f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5806,9 +5806,11 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
5806 0, false, MIGRATE_SYNC, 5806 0, false, MIGRATE_SYNC,
5807 MR_CMA); 5807 MR_CMA);
5808 } 5808 }
5809 5809 if (ret < 0) {
5810 putback_movable_pages(&cc->migratepages); 5810 putback_movable_pages(&cc->migratepages);
5811 return ret > 0 ? 0 : ret; 5811 return ret;
5812 }
5813 return 0;
5812} 5814}
5813 5815
5814/** 5816/**