diff options
author | Mel Gorman <mgorman@suse.de> | 2013-12-18 20:08:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-18 22:04:51 -0500 |
commit | eb4489f69f224356193364dc2762aa009738ca7f (patch) | |
tree | 989a782b069c484155770d122026ce2f447e8a2a /mm/migrate.c | |
parent | c3a489cac38d43ea6dc4ac240473b44b46deecf7 (diff) |
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>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index be787d506fbb..a987525810ae 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1780,7 +1780,8 @@ fail_putback: | |||
1780 | putback_lru_page(page); | 1780 | putback_lru_page(page); |
1781 | mod_zone_page_state(page_zone(page), | 1781 | mod_zone_page_state(page_zone(page), |
1782 | NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR); | 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 @@ out_dropref: | |||
1854 | } | 1855 | } |
1855 | spin_unlock(ptl); | 1856 | spin_unlock(ptl); |
1856 | 1857 | ||
1858 | out_unlock: | ||
1857 | unlock_page(page); | 1859 | unlock_page(page); |
1858 | put_page(page); | 1860 | put_page(page); |
1859 | return 0; | 1861 | return 0; |