/* This is called when relaxing access to a PTE. It's also called in the page fault path when we don't hit any of the major fault cases, ie, a minor update of _PAGE_ACCESSED, _PAGE_DIRTY, etc... The generic code will have handled those two for us, we additionally deal with missing execute permission here on some processors  */
int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t entry, int dirty)
/* This is called when relaxing access to a PTE. It's also called in the page fault path when we don't hit any of the major fault cases, ie, a minor update of _PAGE_ACCESSED, _PAGE_DIRTY, etc... The generic code will have handled those two for us, we additionally deal with missing execute permission here on some processors  */
int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t entry, int dirty)
{
	int changed;
	entry = set_access_flags_filter(entry, vma, dirty);
	changed = !pte_same(*(ptep), entry);
	if (changed) {
		if (!(vma->vm_flags & VM_HUGETLB))
			assert_pte_locked(vma->vm_mm, address);
		__ptep_set_access_flags(ptep, entry);
		flush_tlb_page_nohash(vma, address);
	}
	return changed;
}