From bf97949333c631c5083123b710660ba257db6b98 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Feb 2013 13:13:59 +1100 Subject: [PATCH] mm/page_alloc.c:__alloc_contig_migrate_range(): cleanup remove a test-n-branch in the wrapup code Cc: Marek Szyprowski Cc: Michal Nazarewicz Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton --- mm/page_alloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5948a77994bb..9acd27e5dc2b 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, 0, false, MIGRATE_SYNC, MR_CMA); } - if (ret < 0) + if (ret < 0) { putback_movable_pages(&cc->migratepages); - return ret > 0 ? 0 : ret; + return ret; + } + return 0; } /** -- 2.39.5