Fix the migration cache patch so that it will link even if CONFIG_MEMORY_MIGRATE is not set. Signed-off-by:Ray Bryant Index: linux-2.6.10-rc2-mm4-page-migration-only/include/linux/mm.h =================================================================== --- linux-2.6.10-rc2-mm4-page-migration-only.orig/include/linux/mm.h 2004-12-29 09:30:00.000000000 -0800 +++ linux-2.6.10-rc2-mm4-page-migration-only/include/linux/mm.h 2004-12-29 09:33:46.000000000 -0800 @@ -279,6 +279,7 @@ struct page { #include #include +#ifdef CONFIG_MEMORY_MIGRATE static inline int PageMigration(struct page *page) { swp_entry_t entry; @@ -293,7 +294,9 @@ static inline int PageMigration(struct p return 1; } - +#else +#define PageMigration(p) 0 +#endif /* CONFIG_MEMORY_MIGRATE */ /* * Methods to modify the page usage count. @@ -506,9 +509,13 @@ static inline struct address_space *page { struct address_space *mapping = page->mapping; +#ifdef CONFIG_MEMORY_MIGRATE if (unlikely(PageMigration(page))) mapping = &migration_space; else if (unlikely(PageSwapCache(page))) +#else + if (unlikely(PageSwapCache(page))) +#endif mapping = &swapper_space; else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) mapping = NULL; Index: linux-2.6.10-rc2-mm4-page-migration-only/include/linux/swapops.h =================================================================== --- linux-2.6.10-rc2-mm4-page-migration-only.orig/include/linux/swapops.h 2004-12-29 09:30:00.000000000 -0800 +++ linux-2.6.10-rc2-mm4-page-migration-only/include/linux/swapops.h 2004-12-29 09:36:30.000000000 -0800 @@ -70,6 +70,7 @@ static inline pte_t swp_entry_to_pte(swp return __swp_entry_to_pte(arch_entry); } +#ifdef CONFIG_MEMORY_MIGRATE static inline int pte_is_migration(pte_t pte) { unsigned long swp_type; @@ -81,6 +82,9 @@ static inline int pte_is_migration(pte_t return swp_type == MIGRATION_TYPE; } +#else +#define pte_is_migration(x) 0 +#endif /* CONFIG_MEMORY_MIGRATE */ static inline pte_t migration_entry_to_pte(swp_entry_t entry) {