
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/mm/Kconfig    |    5 +++++
 memhotplug-dave/mm/mmigrate.c |    3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff -puN mm/Kconfig~P07.1-memory_migration-merge mm/Kconfig
--- memhotplug/mm/Kconfig~P07.1-memory_migration-merge	2004-12-10 13:53:05.000000000 -0800
+++ memhotplug-dave/mm/Kconfig	2004-12-10 13:53:05.000000000 -0800
@@ -13,4 +13,9 @@ config CONTIGUOUS_MEM_MAP
 config MEMORY_HOTPLUG
 	bool "Allow for memory hotplug"
 	depends on NONLINEAR && HOTPLUG
+	select MEMORY_MIGRATE
+
+config MEMORY_MIGRATE
+	bool "Memory migration"
+	default y if MEMORY_HOTPLUG
 
diff -puN mm/mmigrate.c~P07.1-memory_migration-merge mm/mmigrate.c
--- memhotplug/mm/mmigrate.c~P07.1-memory_migration-merge	2004-12-10 13:53:05.000000000 -0800
+++ memhotplug-dave/mm/mmigrate.c	2004-12-10 13:53:05.000000000 -0800
@@ -310,7 +310,8 @@ migrate_onepage(struct page *page)
 	 * Allocate a new page with the same gfp_mask
 	 * as the target page has.
 	 */
-	if ((newpage = page_cache_alloc(mapping)) == NULL) {
+	newpage = page_cache_alloc(mapping, page->index);
+	if (newpage == NULL) {
 		unlock_page(page);
 		return ERR_PTR(-ENOMEM);
 	}
_
