linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages
@ 2011-11-25 12:20 Hillf Danton
  2011-11-26 17:33 ` Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2011-11-25 12:20 UTC (permalink / raw)
  To: Naoya Horiguchi; +Cc: Andrea Arcangeli, Andrew Morton, LKML, linux-mm

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

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- 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@kvack.org.  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@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-26 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 12:20 [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages Hillf Danton
2011-11-26 17:33 ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).