mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
mm: remove unevictable_migrate_page function
unevictable_migrate_page() in mm/internal.h is a relic of the since removed UNEVICTABLE_LRU Kconfig option. This patch removes the function and open codes the test in migrate_page_copy(). Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4eb2b1dcd5
commit
418b27ef50
2 changed files with 2 additions and 14 deletions
|
@ -63,18 +63,6 @@ static inline unsigned long page_order(struct page *page)
|
||||||
return page_private(page);
|
return page_private(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* unevictable_migrate_page() called only from migrate_page_copy() to
|
|
||||||
* migrate unevictable flag to new page.
|
|
||||||
* Note that the old page has been isolated from the LRU lists at this
|
|
||||||
* point so we don't need to worry about LRU statistics.
|
|
||||||
*/
|
|
||||||
static inline void unevictable_migrate_page(struct page *new, struct page *old)
|
|
||||||
{
|
|
||||||
if (TestClearPageUnevictable(old))
|
|
||||||
SetPageUnevictable(new);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
extern long mlock_vma_pages_range(struct vm_area_struct *vma,
|
extern long mlock_vma_pages_range(struct vm_area_struct *vma,
|
||||||
unsigned long start, unsigned long end);
|
unsigned long start, unsigned long end);
|
||||||
|
|
|
@ -288,8 +288,8 @@ static void migrate_page_copy(struct page *newpage, struct page *page)
|
||||||
if (TestClearPageActive(page)) {
|
if (TestClearPageActive(page)) {
|
||||||
VM_BUG_ON(PageUnevictable(page));
|
VM_BUG_ON(PageUnevictable(page));
|
||||||
SetPageActive(newpage);
|
SetPageActive(newpage);
|
||||||
} else
|
} else if (TestClearPageUnevictable(page))
|
||||||
unevictable_migrate_page(newpage, page);
|
SetPageUnevictable(newpage);
|
||||||
if (PageChecked(page))
|
if (PageChecked(page))
|
||||||
SetPageChecked(newpage);
|
SetPageChecked(newpage);
|
||||||
if (PageMappedToDisk(page))
|
if (PageMappedToDisk(page))
|
||||||
|
|
Loading…
Reference in a new issue