diff options
-rw-r--r-- | include/linux/page-flags.h | 1 | ||||
-rw-r--r-- | mm/migrate.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b12f93a3c345..628ec0802492 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -228,6 +228,7 @@ PAGEFLAG_FALSE(HighMem) | |||
228 | PAGEFLAG(SwapCache, swapcache) | 228 | PAGEFLAG(SwapCache, swapcache) |
229 | #else | 229 | #else |
230 | PAGEFLAG_FALSE(SwapCache) | 230 | PAGEFLAG_FALSE(SwapCache) |
231 | SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache) | ||
231 | #endif | 232 | #endif |
232 | 233 | ||
233 | #ifdef CONFIG_UNEVICTABLE_LRU | 234 | #ifdef CONFIG_UNEVICTABLE_LRU |
diff --git a/mm/migrate.c b/mm/migrate.c index 60510306c44a..55373983c9c6 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -300,12 +300,10 @@ static int migrate_page_move_mapping(struct address_space *mapping, | |||
300 | * Now we know that no one else is looking at the page. | 300 | * Now we know that no one else is looking at the page. |
301 | */ | 301 | */ |
302 | get_page(newpage); /* add cache reference */ | 302 | get_page(newpage); /* add cache reference */ |
303 | #ifdef CONFIG_SWAP | ||
304 | if (PageSwapCache(page)) { | 303 | if (PageSwapCache(page)) { |
305 | SetPageSwapCache(newpage); | 304 | SetPageSwapCache(newpage); |
306 | set_page_private(newpage, page_private(page)); | 305 | set_page_private(newpage, page_private(page)); |
307 | } | 306 | } |
308 | #endif | ||
309 | 307 | ||
310 | radix_tree_replace_slot(pslot, newpage); | 308 | radix_tree_replace_slot(pslot, newpage); |
311 | 309 | ||
@@ -373,9 +371,7 @@ static void migrate_page_copy(struct page *newpage, struct page *page) | |||
373 | 371 | ||
374 | mlock_migrate_page(newpage, page); | 372 | mlock_migrate_page(newpage, page); |
375 | 373 | ||
376 | #ifdef CONFIG_SWAP | ||
377 | ClearPageSwapCache(page); | 374 | ClearPageSwapCache(page); |
378 | #endif | ||
379 | ClearPagePrivate(page); | 375 | ClearPagePrivate(page); |
380 | set_page_private(page, 0); | 376 | set_page_private(page, 0); |
381 | /* page->mapping contains a flag for PageAnon() */ | 377 | /* page->mapping contains a flag for PageAnon() */ |