From: Andrew Morton Dink with whitespace. (I do this while reviewing it. Can't help myself). Cc: KAMEZAWA Hiroyuki Cc: Mike Kravetz Cc: Christoph Lameter Signed-off-by: Andrew Morton --- include/linux/swap.h | 1 - mm/vmscan.c | 17 +++++++++-------- vm/page_migration | 0 3 files changed, 9 insertions(+), 9 deletions(-) diff -puN Documentation/vm/page_migration~direct-migration-v9-migrate_pages-extension-fixes Documentation/vm/page_migration diff -puN include/linux/swap.h~direct-migration-v9-migrate_pages-extension-fixes include/linux/swap.h --- 25/include/linux/swap.h~direct-migration-v9-migrate_pages-extension-fixes Tue Jan 17 16:24:05 2006 +++ 25-akpm/include/linux/swap.h Tue Jan 17 16:24:05 2006 @@ -191,7 +191,6 @@ static inline int zone_reclaim(struct zo extern int isolate_lru_page(struct page *p); extern int putback_lru_pages(struct list_head *l); extern int migrate_page(struct page *, struct page *); -extern int migrate_page_remove_references(struct page *, struct page *, int); extern void migrate_page_copy(struct page *, struct page *); extern int migrate_pages(struct list_head *l, struct list_head *t, struct list_head *moved, struct list_head *failed); diff -puN mm/vmscan.c~direct-migration-v9-migrate_pages-extension-fixes mm/vmscan.c --- 25/mm/vmscan.c~direct-migration-v9-migrate_pages-extension-fixes Tue Jan 17 16:24:05 2006 +++ 25-akpm/mm/vmscan.c Tue Jan 17 16:24:05 2006 @@ -653,6 +653,7 @@ unlock_retry: retry: return -EAGAIN; } + /* * Page migration was first developed in the context of the memory hotplug * project. The main authors of the migration code are: @@ -667,7 +668,8 @@ retry: * Remove references for a page and establish the new page with the correct * basic settings to be able to stop accesses to the page. */ -int migrate_page_remove_references(struct page *newpage, struct page *page, int nr_refs) +static int migrate_page_remove_references(struct page *newpage, + struct page *page, int nr_refs) { struct address_space *mapping = page_mapping(page); struct page **radix_pointer; @@ -700,7 +702,7 @@ int migrate_page_remove_references(struc * If the page was not migrated then the PageSwapCache bit * is still set and the operation may continue. */ - for(i = 0; i < 10 && page_mapped(page); i++) { + for (i = 0; i < 10 && page_mapped(page); i++) { int rc = try_to_unmap(page); if (rc == SWAP_SUCCESS) @@ -724,9 +726,8 @@ int migrate_page_remove_references(struc &mapping->page_tree, page_index(page)); - if (!page_mapping(page) || - page_count(page) != nr_refs || - *radix_pointer != page) { + if (!page_mapping(page) || page_count(page) != nr_refs || + *radix_pointer != page) { write_unlock_irq(&mapping->tree_lock); return 1; } @@ -963,10 +964,10 @@ next: list_move(&page->lru, failed); nr_failed++; } else { - if (newpage) - /* Successful migration. Return new page to LRU */ + if (newpage) { + /* Successful migration. Return page to LRU */ move_to_lru(newpage); - + } list_move(&page->lru, moved); } } _