Commit 628e1b8c authored by James Houghton's avatar James Houghton Committed by Andrew Morton
Browse files

mm: add missing mmu_notifier_clear_young for !MMU_NOTIFIER

parent 3f1f947a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -606,6 +606,13 @@ static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm,
	return 0;
}

static inline int mmu_notifier_clear_young(struct mm_struct *mm,
					   unsigned long start,
					   unsigned long end)
{
	return 0;
}

static inline int mmu_notifier_test_young(struct mm_struct *mm,
					  unsigned long address)
{
+0 −2
Original line number Diff line number Diff line
@@ -353,11 +353,9 @@ static void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,
		set_huge_pte_at(mm, addr, pte, entry, psize);
	}

#ifdef CONFIG_MMU_NOTIFIER
	if (mmu_notifier_clear_young(mm, addr,
				     addr + huge_page_size(hstate_vma(vma))))
		referenced = true;
#endif /* CONFIG_MMU_NOTIFIER */

	if (referenced)
		folio_set_young(folio);