Revert "mm/migrate: Pass vm_fault pointer to migrate_misplaced_page()"

This reverts commit b7efa36bf5.

Bug: 128240262
Change-Id: I21a63bb3e600beb422a8fc5240a4c3bed611fadc
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:
Minchan Kim 2019-03-11 11:40:29 +09:00 • committed by Alexander Winkowski
commit c1826f5b61
No known key found for this signature in database
GPG key ID: 72762A66704CDE44
3 changed files with 5 additions and 5 deletions

View file

@ -131,14 +131,14 @@ static inline void __ClearPageMovable(struct page *page)
#ifdef CONFIG_NUMA_BALANCING
extern bool pmd_trans_migrating(pmd_t pmd);
extern int migrate_misplaced_page(struct page *page,
struct vm_fault *vmf, int node);
struct vm_area_struct *vma, int node);
#else
static inline bool pmd_trans_migrating(pmd_t pmd)
{
return false;
}
static inline int migrate_misplaced_page(struct page *page,
struct vm_fault *vmf, int node)
struct vm_area_struct *vma, int node)
{
return -EAGAIN; /* can't migrate now */
}

View file

@ -4001,7 +4001,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
}
/* Migrate to the requested node */
migrated = migrate_misplaced_page(page, vmf, target_nid);
migrated = migrate_misplaced_page(page, vma, target_nid);
if (migrated) {
page_nid = target_nid;
flags |= TNF_MIGRATED;

View file

@ -1976,7 +1976,7 @@ bool pmd_trans_migrating(pmd_t pmd)
* node. Caller is expected to have an elevated reference count on
* the page that will be dropped by this function before returning.
*/
int migrate_misplaced_page(struct page *page, struct vm_fault *vmf,
int migrate_misplaced_page(struct page *page, struct vm_area_struct *vma,
int node)
{
pg_data_t *pgdat = NODE_DATA(node);
@ -1989,7 +1989,7 @@ int migrate_misplaced_page(struct page *page, struct vm_fault *vmf,
* with execute permissions as they are probably shared libraries.
*/
if (page_mapcount(page) != 1 && page_is_file_cache(page) &&
(vmf->vma_flags & VM_EXEC))
(vma->vm_flags & VM_EXEC))
goto out;
/*