mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
Revert "mm: introduce __page_add_new_anon_rmap()"
This reverts commit d56126780c.
Bug: 128240262
Change-Id: Ia5a417e52de006fba4f8b1b51d9ae4db36fd9035
Signed-off-by: Minchan Kim <minchan@google.com>
[dereference23: Forward port to msm-5.4]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
parent
fa0483bf62
commit
7ec1f37926
3 changed files with 9 additions and 16 deletions
|
|
@ -198,16 +198,8 @@ void page_add_anon_rmap(struct page *, struct vm_area_struct *,
|
|||
unsigned long, bool);
|
||||
void do_page_add_anon_rmap(struct page *, struct vm_area_struct *,
|
||||
unsigned long, int);
|
||||
void __page_add_new_anon_rmap(struct page *page, struct vm_area_struct *vma,
|
||||
unsigned long address, bool compound);
|
||||
static inline void page_add_new_anon_rmap(struct page *page,
|
||||
struct vm_area_struct *vma,
|
||||
unsigned long address, bool compound)
|
||||
{
|
||||
VM_BUG_ON_VMA(address < vma->vm_start || address >= vma->vm_end, vma);
|
||||
__page_add_new_anon_rmap(page, vma, address, compound);
|
||||
}
|
||||
|
||||
void page_add_new_anon_rmap(struct page *, struct vm_area_struct *,
|
||||
unsigned long, bool);
|
||||
void page_add_file_rmap(struct page *, bool);
|
||||
void page_remove_rmap(struct page *, bool);
|
||||
|
||||
|
|
|
|||
|
|
@ -2585,7 +2585,7 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf)
|
|||
* thread doing COW.
|
||||
*/
|
||||
ptep_clear_flush_notify(vma, vmf->address, vmf->pte);
|
||||
__page_add_new_anon_rmap(new_page, vma, vmf->address, false);
|
||||
page_add_new_anon_rmap(new_page, vma, vmf->address, false);
|
||||
mem_cgroup_commit_charge(new_page, memcg, false, false);
|
||||
__lru_cache_add_active_or_unevictable(new_page, vmf->vma_flags);
|
||||
/*
|
||||
|
|
@ -3145,7 +3145,7 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
|
|||
|
||||
/* ksm created a completely new copy */
|
||||
if (unlikely(page != swapcache && swapcache)) {
|
||||
__page_add_new_anon_rmap(page, vma, vmf->address, false);
|
||||
page_add_new_anon_rmap(page, vma, vmf->address, false);
|
||||
mem_cgroup_commit_charge(page, memcg, false, false);
|
||||
__lru_cache_add_active_or_unevictable(page, vmf->vma_flags);
|
||||
} else {
|
||||
|
|
@ -3296,7 +3296,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
|
|||
}
|
||||
|
||||
inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
|
||||
__page_add_new_anon_rmap(page, vma, vmf->address, false);
|
||||
page_add_new_anon_rmap(page, vma, vmf->address, false);
|
||||
mem_cgroup_commit_charge(page, memcg, false, false);
|
||||
__lru_cache_add_active_or_unevictable(page, vmf->vma_flags);
|
||||
setpte:
|
||||
|
|
@ -3575,7 +3575,7 @@ vm_fault_t alloc_set_pte(struct vm_fault *vmf, struct mem_cgroup *memcg,
|
|||
/* copy-on-write page */
|
||||
if (write && !(vmf->vma_flags & VM_SHARED)) {
|
||||
inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
|
||||
__page_add_new_anon_rmap(page, vma, vmf->address, false);
|
||||
page_add_new_anon_rmap(page, vma, vmf->address, false);
|
||||
mem_cgroup_commit_charge(page, memcg, false, false);
|
||||
__lru_cache_add_active_or_unevictable(page, vmf->vma_flags);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@ void do_page_add_anon_rmap(struct page *page,
|
|||
}
|
||||
|
||||
/**
|
||||
* __page_add_new_anon_rmap - add pte mapping to a new anonymous page
|
||||
* page_add_new_anon_rmap - add pte mapping to a new anonymous page
|
||||
* @page: the page to add the mapping to
|
||||
* @vma: the vm area in which the mapping is added
|
||||
* @address: the user virtual address mapped
|
||||
|
|
@ -1160,11 +1160,12 @@ void do_page_add_anon_rmap(struct page *page,
|
|||
* This means the inc-and-test can be bypassed.
|
||||
* Page does not have to be locked.
|
||||
*/
|
||||
void __page_add_new_anon_rmap(struct page *page,
|
||||
void page_add_new_anon_rmap(struct page *page,
|
||||
struct vm_area_struct *vma, unsigned long address, bool compound)
|
||||
{
|
||||
int nr = compound ? hpage_nr_pages(page) : 1;
|
||||
|
||||
VM_BUG_ON_VMA(address < vma->vm_start || address >= vma->vm_end, vma);
|
||||
__SetPageSwapBacked(page);
|
||||
if (compound) {
|
||||
VM_BUG_ON_PAGE(!PageTransHuge(page), page);
|
||||
|
|
|
|||
Loading…
Reference in a new issue