Commit 6d91add09f4bad5f4d4233b13faa392f0c4b16be
Committed by
Linus Torvalds
1 parent
3c1d43787b
Exists in
master
and in
4 other branches
mm: add Set,ClearPageSwapCache stubs
If we add NOOP stubs for SetPageSwapCache() and ClearPageSwapCache(), then we can remove the #ifdef CONFIG_SWAPs from mm/migrate.c. Signed-off-by: Hugh Dickins <hugh@veritas.com> Acked-by: Christoph Lameter <cl@linux-foundation.org> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 1 additions and 4 deletions Side-by-side Diff
include/linux/page-flags.h
mm/migrate.c
... | ... | @@ -300,12 +300,10 @@ |
300 | 300 | * Now we know that no one else is looking at the page. |
301 | 301 | */ |
302 | 302 | get_page(newpage); /* add cache reference */ |
303 | -#ifdef CONFIG_SWAP | |
304 | 303 | if (PageSwapCache(page)) { |
305 | 304 | SetPageSwapCache(newpage); |
306 | 305 | set_page_private(newpage, page_private(page)); |
307 | 306 | } |
308 | -#endif | |
309 | 307 | |
310 | 308 | radix_tree_replace_slot(pslot, newpage); |
311 | 309 | |
312 | 310 | |
... | ... | @@ -373,9 +371,7 @@ |
373 | 371 | |
374 | 372 | mlock_migrate_page(newpage, page); |
375 | 373 | |
376 | -#ifdef CONFIG_SWAP | |
377 | 374 | ClearPageSwapCache(page); |
378 | -#endif | |
379 | 375 | ClearPagePrivate(page); |
380 | 376 | set_page_private(page, 0); |
381 | 377 | /* page->mapping contains a flag for PageAnon() */ |