mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
mm/rmap: use rmap_walk() in try_to_unmap()
Now, we have an infrastructure in rmap_walk() to handle difference from variants of rmap traversing functions. So, just use it in try_to_unmap(). In this patch, I change following things. 1. enable rmap_walk() if !CONFIG_MIGRATION. 2. mechanical change to use rmap_walk() in try_to_unmap(). Signed-off-by: Joonsoo Kim <[email protected]> Reviewed-by: Naoya Horiguchi <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Hillf Danton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0dd1c7bbce
commit
5262950642
3 changed files with 39 additions and 18 deletions
4
mm/ksm.c
4
mm/ksm.c
|
|
@ -1982,7 +1982,7 @@ again:
|
|||
continue;
|
||||
|
||||
ret = try_to_unmap_one(page, vma,
|
||||
rmap_item->address, flags);
|
||||
rmap_item->address, (void *)flags);
|
||||
if (ret != SWAP_AGAIN || !page_mapped(page)) {
|
||||
anon_vma_unlock_read(anon_vma);
|
||||
goto out;
|
||||
|
|
@ -1996,7 +1996,6 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIGRATION
|
||||
int rmap_walk_ksm(struct page *page, struct rmap_walk_control *rwc)
|
||||
{
|
||||
struct stable_node *stable_node;
|
||||
|
|
@ -2054,6 +2053,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIGRATION
|
||||
void ksm_migrate_page(struct page *newpage, struct page *oldpage)
|
||||
{
|
||||
struct stable_node *stable_node;
|
||||
|
|
|
|||
Loading…
Reference in a new issue