From 5fcd2b3f0677784bc5a691171b899d84da03a596 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 9 Nov 2012 14:04:30 +1100 Subject: [PATCH] mm-adjust-address_space_operationsmigratepage-return-code-fix Cc: Rafael Aquini Signed-off-by: Andrew Morton --- mm/migrate.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 10c77c0154b4..2424efba605d 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -996,15 +996,12 @@ int migrate_pages(struct list_head *from, } } } - rc = 0; + rc = nr_failed + retry; out: if (!swapwrite) current->flags &= ~PF_SWAPWRITE; - if (rc != MIGRATEPAGE_SUCCESS) - return rc; - - return nr_failed + retry; + return rc; } int migrate_huge_page(struct page *hpage, new_page_t get_new_page, -- 2.39.5