From: Mel Gorman Date: Tue, 7 Jan 2014 14:00:42 +0000 (+0000) Subject: mm: numa: avoid unnecessary work on the failure path X-Git-Tag: submit/tizen_common/20140905.094502~1136 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3b578d9d009a9f670e893cec8579aa069aaaccb;p=sdk%2Femulator%2Femulator-kernel.git mm: numa: avoid unnecessary work on the failure path commit eb4489f69f224356193364dc2762aa009738ca7f upstream. If a PMD changes during a THP migration then migration aborts but the failure path is doing more work than is necessary. Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel Cc: Alex Thorlton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/migrate.c b/mm/migrate.c index 818c1691855a..e33f0d116344 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1726,7 +1726,8 @@ fail_putback: putback_lru_page(page); mod_zone_page_state(page_zone(page), NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR); - goto out_fail; + + goto out_unlock; } /* @@ -1800,6 +1801,7 @@ out_dropref: } spin_unlock(&mm->page_table_lock); +out_unlock: unlock_page(page); put_page(page); return 0;