[PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Skip unlocking page if fail to lock, then lock and unlock are paired.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/mm/migrate.c	Fri Nov 25 20:11:14 2011
+++ b/mm/migrate.c	Fri Nov 25 20:21:26 2011
@@ -869,9 +869,9 @@ static int unmap_and_move_huge_page(new_

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

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]