mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/3] balancenuma: free new thp if fail to isolate the old
@ 2012-11-24  4:18 Hillf Danton
  2012-11-24 13:06 ` Mel Gorman
  0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2012-11-24  4:18 UTC (permalink / raw)
  To: Mel Gorman; +Cc: Hillf Danton, LKML

Free newly allocated thp if fail to isolate the old.

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

--- a/mm/migrate.c	Fri Nov 23 21:29:40 2012
+++ b/mm/migrate.c	Fri Nov 23 22:52:06 2012
@@ -1624,8 +1624,10 @@ int migrate_misplaced_transhuge_page(str
 		goto out_dropref;

 	isolated = numamigrate_isolate_page(pgdat, page);
-	if (!isolated)
+	if (!isolated) {
+		put_page(new_page);
 		goto out_keep_locked;
+	}
 	list_add(&page->lru, &migratepages);

 	/* Prepare a page as a migration target */
--

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

end of thread, other threads:[~2012-11-24 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-24  4:18 [PATCH 2/3] balancenuma: free new thp if fail to isolate the old Hillf Danton
2012-11-24 13:06 ` Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®