mm: mempolicy: Implement change_prot_numa() in terms of change_protection()
This patch converts change_prot_numa() to use change_protection(). As pte_numa and friends check the PTE bits directly it is necessary for change_protection() to use pmd_mknuma(). Hence the required modifications to change_protection() are a little clumsy but the end result is that most of the numa page table helpers are just one or two instructions. Signed-off-by: Mel Gorman <mgorman@suse.de>
This commit is contained in:
@@ -1080,7 +1080,7 @@ extern unsigned long do_mremap(unsigned long addr,
|
||||
unsigned long flags, unsigned long new_addr);
|
||||
extern unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end, pgprot_t newprot,
|
||||
int dirty_accountable);
|
||||
int dirty_accountable, int prot_numa);
|
||||
extern int mprotect_fixup(struct vm_area_struct *vma,
|
||||
struct vm_area_struct **pprev, unsigned long start,
|
||||
unsigned long end, unsigned long newflags);
|
||||
@@ -1552,7 +1552,7 @@ static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_USES_NUMA_PROT_NONE
|
||||
void change_prot_numa(struct vm_area_struct *vma,
|
||||
unsigned long change_prot_numa(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user