]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm: add missing mmu_notifier_clear_young for !MMU_NOTIFIER
authorJames Houghton <jthoughton@google.com>
Mon, 21 Oct 2024 16:02:12 +0000 (16:02 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:17 +0000 (20:11 -0800)
Remove the now unnecessary ifdef in mm/damon/vaddr.c as well.

Link: https://lkml.kernel.org/r/20241021160212.9935-1-jthoughton@google.com
Signed-off-by: James Houghton <jthoughton@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mmu_notifier.h
mm/damon/vaddr.c

index d39ebb10caeb68453af7595a741bd5fe2c390b40..e2dd57ca368b0a4b9cc1818773ad210310e184ef 100644 (file)
@@ -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)
 {
index 08cfd22b5249257220e184156e36b3f3d8cf989a..821990d0141a01cd560e646ed27048364553f6e0 100644 (file)
@@ -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);