[PATCH] mm/mmu_notifier: Fix build on !CONFIG_MMU_NOTIFIER

shaikh.kamal posted 1 patch 11 hours ago
include/linux/mmu_notifier.h | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] mm/mmu_notifier: Fix build on !CONFIG_MMU_NOTIFIER
Posted by shaikh.kamal 11 hours ago
Add missing static inline stub for mmu_notifier_oom_enter() in
the !CONFIG_MMU_NOTIFIER section of include/linux/mmu_notifier.h.

Without this stub, allnoconfig builds fail with:
  mm/oom_kill.c:523: error: implicit declaration of function
  'mmu_notifier_oom_enter'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605031109.uxckW5L3-lkp@intel.com/

Signed-off-by: shaikh.kamal <shaikhkamal2012@gmail.com>
---
 include/linux/mmu_notifier.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index 0ccd590f55d3..ad1a5e311ab7 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -670,6 +670,10 @@ static inline void mmu_notifier_synchronize(void)
 {
 }
 
+static inline void mmu_notifier_oom_enter(struct mm_struct *mm)
+{
+}
+
 #endif /* CONFIG_MMU_NOTIFIER */
 
 #endif /* _LINUX_MMU_NOTIFIER_H */
-- 
2.43.0