summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-01-07 14:00:42 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 12:25:13 -0800
commitf3b578d9d009a9f670e893cec8579aa069aaaccb (patch)
tree555a0dd66311e3f90eb3d8aa86b3f14487d7d7ed /mm
parent273b7205315533d9327323ad7a115d9feec943b7 (diff)
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 <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Alex Thorlton <athorlton@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/migrate.c4
1 files changed, 3 insertions, 1 deletions
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;