Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09761333 authored by Hillf Danton's avatar Hillf Danton Committed by Linus Torvalds
Browse files

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: default avatarHillf Danton <dhillf@gmail.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 58a84aa9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -871,9 +871,9 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,

	if (anon_vma)
		put_anon_vma(anon_vma);
out:
	unlock_page(hpage);

out:
	if (rc != -EAGAIN) {
		list_del(&hpage->lru);
		put_page(hpage);