mm/migrate.c: pair unlock_page() and lock_page() when migrating huge pages
Avoid unlocking and unlocked page if we failed to lock it. Signed-off-by: Hillf Danton <dhillf@gmail.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
58a84aa927
commit
09761333ed
|
@ -871,9 +871,9 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
|
||||||
|
|
||||||
if (anon_vma)
|
if (anon_vma)
|
||||||
put_anon_vma(anon_vma);
|
put_anon_vma(anon_vma);
|
||||||
out:
|
|
||||||
unlock_page(hpage);
|
unlock_page(hpage);
|
||||||
|
|
||||||
|
out:
|
||||||
if (rc != -EAGAIN) {
|
if (rc != -EAGAIN) {
|
||||||
list_del(&hpage->lru);
|
list_del(&hpage->lru);
|
||||||
put_page(hpage);
|
put_page(hpage);
|
||||||
|
|
Loading…
Reference in New Issue