[PATCH 2/3] balancenuma: free new thp if fail to isolate the old

From: Hillf Danton
Date: Fri Nov 23 2012 - 23:19:01 EST


Free newly allocated thp if fail to isolate the old.

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

--- 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 */
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/