Commit eb4489f69f224356193364dc2762aa009738ca7f

Authored by Mel Gorman
Committed by Linus Torvalds
1 parent c3a489cac3

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 <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -1780,7 +1780,8 @@
1780 1780 putback_lru_page(page);
1781 1781 mod_zone_page_state(page_zone(page),
1782 1782 NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR);
1783   - goto out_fail;
  1783 +
  1784 + goto out_unlock;
1784 1785 }
1785 1786  
1786 1787 /*
... ... @@ -1854,6 +1855,7 @@
1854 1855 }
1855 1856 spin_unlock(ptl);
1856 1857  
  1858 +out_unlock:
1857 1859 unlock_page(page);
1858 1860 put_page(page);
1859 1861 return 0;