From 6338289f9645b4535ea15f9ae97e7f535247ff63 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Wed, 8 Jun 2022 08:28:04 -0700 Subject: [PATCH] Revert "ANDROID: Fix build errors caused by missing mmu_notifier_lock definition" This reverts commit dbc5eb8e31f70b6a559da56a93668d90ed38a5c0. Reason for revert: performance regression. Bug: 234527424 Signed-off-by: Suren Baghdasaryan Change-Id: I685f09cfe4d2b3fef9e88953f794186c0e790657 --- include/linux/mm_types.h | 2 +- include/linux/mmu_notifier.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 677c1fad155f..07f25e502078 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -580,10 +580,10 @@ struct mm_struct { struct file __rcu *exe_file; #ifdef CONFIG_MMU_NOTIFIER struct mmu_notifier_subscriptions *notifier_subscriptions; -#endif /* CONFIG_MMU_NOTIFIER */ #ifdef CONFIG_SPECULATIVE_PAGE_FAULT struct percpu_rw_semaphore *mmu_notifier_lock; #endif /* CONFIG_SPECULATIVE_PAGE_FAULT */ +#endif /* CONFIG_MMU_NOTIFIER */ #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS pgtable_t pmd_huge_pte; /* protected by page_table_lock */ #endif diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index ae04f83b4e37..d0430410fdd8 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -772,7 +772,7 @@ static inline void mmu_notifier_synchronize(void) #endif /* CONFIG_MMU_NOTIFIER */ -#if defined(CONFIG_SPECULATIVE_PAGE_FAULT) +#if defined(CONFIG_MMU_NOTIFIER) && defined(CONFIG_SPECULATIVE_PAGE_FAULT) static inline bool mmu_notifier_trylock(struct mm_struct *mm) {