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

This reverts commit f86d0448cd.
This commit is contained in:
UtsavBalar1231 2022-04-28 19:17:24 +05:30 committed by spakkkk
parent 0766ed1a48
commit 46f586f9d0
3 changed files with 5 additions and 5 deletions

View File

@ -126,14 +126,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

@ -4165,7 +4165,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

@ -1966,7 +1966,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);
@ -1979,7 +1979,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;
/*