return young;
}
-static inline int ptep_clear_young_notify(struct vm_area_struct *vma,
+static inline int ptep_test_and_clear_young_notify(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
int young;
return young;
}
-static inline int pmdp_clear_young_notify(struct vm_area_struct *vma,
+static inline int pmdp_test_and_clear_young_notify(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp)
{
int young;
#define clear_flush_young_ptes_notify clear_flush_young_ptes
#define pmdp_clear_flush_young_notify pmdp_clear_flush_young
-#define ptep_clear_young_notify ptep_test_and_clear_young
-#define pmdp_clear_young_notify pmdp_test_and_clear_young
+#define ptep_test_and_clear_young_notify ptep_test_and_clear_young
+#define pmdp_test_and_clear_young_notify pmdp_test_and_clear_young
#endif /* CONFIG_MMU_NOTIFIER */
if (!folio)
continue;
- if (!ptep_clear_young_notify(args->vma, addr, pte + i))
+ if (!ptep_test_and_clear_young_notify(args->vma, addr, pte + i))
continue;
if (last != folio) {
if (!folio)
goto next;
- if (!pmdp_clear_young_notify(vma, addr, pmd + i))
+ if (!pmdp_test_and_clear_young_notify(vma, addr, pmd + i))
goto next;
if (last != folio) {
lockdep_assert_held(pvmw->ptl);
VM_WARN_ON_ONCE_FOLIO(folio_test_lru(folio), folio);
- if (!ptep_clear_young_notify(vma, addr, pte))
+ if (!ptep_test_and_clear_young_notify(vma, addr, pte))
return false;
if (spin_is_contended(pvmw->ptl))
if (!folio)
continue;
- if (!ptep_clear_young_notify(vma, addr, pte + i))
+ if (!ptep_test_and_clear_young_notify(vma, addr, pte + i))
continue;
if (last != folio) {