From: Mel Gorman Date: Thu, 19 Dec 2013 01:08:39 +0000 (-0800) Subject: mm: numa: avoid unnecessary work on the failure path X-Git-Tag: upstream/snapshot3+hdmi~3754^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb4489f69f224356193364dc2762aa009738ca7f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mm: numa: avoid unnecessary work on the failure path 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 Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/migrate.c b/mm/migrate.c index be787d5..a987525 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1780,7 +1780,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; } /* @@ -1854,6 +1855,7 @@ out_dropref: } spin_unlock(ptl); +out_unlock: unlock_page(page); put_page(page); return 0;