Skip to content

Commit eb4489f

Browse files
Mel Gormantorvalds
authored andcommitted
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>
1 parent c3a489c commit eb4489f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm/migrate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,8 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
17801780
putback_lru_page(page);
17811781
mod_zone_page_state(page_zone(page),
17821782
NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR);
1783-
goto out_fail;
1783+
1784+
goto out_unlock;
17841785
}
17851786

17861787
/*
@@ -1854,6 +1855,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
18541855
}
18551856
spin_unlock(ptl);
18561857

1858+
out_unlock:
18571859
unlock_page(page);
18581860
put_page(page);
18591861
return 0;

0 commit comments

Comments
 (0)