mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
mm/mmu_notifier: Rename struct mmu_notifier_mm to mmu_notifier_subscriptions
The name mmu_notifier_mm implies that the thing is a mm_struct pointer, and is difficult to abbreviate. The struct is actually holding the interval tree and hlist containing the notifiers subscribed to a mm. Use 'subscriptions' as the variable name for this struct instead of the really terrible and misleading 'mmn_mm'. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
@@ -490,7 +490,7 @@ struct mm_struct {
|
||||
/* store ref to file /proc/<pid>/exe symlink points to */
|
||||
struct file __rcu *exe_file;
|
||||
#ifdef CONFIG_MMU_NOTIFIER
|
||||
struct mmu_notifier_mm *mmu_notifier_mm;
|
||||
struct mmu_notifier_subscriptions *notifier_subscriptions;
|
||||
#endif
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
|
||||
pgtable_t pmd_huge_pte; /* protected by page_table_lock */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/interval_tree.h>
|
||||
|
||||
struct mmu_notifier_mm;
|
||||
struct mmu_notifier_subscriptions;
|
||||
struct mmu_notifier;
|
||||
struct mmu_notifier_range;
|
||||
struct mmu_interval_notifier;
|
||||
@@ -265,7 +265,7 @@ struct mmu_notifier_range {
|
||||
|
||||
static inline int mm_has_notifiers(struct mm_struct *mm)
|
||||
{
|
||||
return unlikely(mm->mmu_notifier_mm);
|
||||
return unlikely(mm->notifier_subscriptions);
|
||||
}
|
||||
|
||||
struct mmu_notifier *mmu_notifier_get_locked(const struct mmu_notifier_ops *ops,
|
||||
@@ -364,7 +364,7 @@ static inline bool mmu_interval_check_retry(struct mmu_interval_notifier *mni,
|
||||
return READ_ONCE(mni->invalidate_seq) != seq;
|
||||
}
|
||||
|
||||
extern void __mmu_notifier_mm_destroy(struct mm_struct *mm);
|
||||
extern void __mmu_notifier_subscriptions_destroy(struct mm_struct *mm);
|
||||
extern void __mmu_notifier_release(struct mm_struct *mm);
|
||||
extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm,
|
||||
unsigned long start,
|
||||
@@ -480,15 +480,15 @@ static inline void mmu_notifier_invalidate_range(struct mm_struct *mm,
|
||||
__mmu_notifier_invalidate_range(mm, start, end);
|
||||
}
|
||||
|
||||
static inline void mmu_notifier_mm_init(struct mm_struct *mm)
|
||||
static inline void mmu_notifier_subscriptions_init(struct mm_struct *mm)
|
||||
{
|
||||
mm->mmu_notifier_mm = NULL;
|
||||
mm->notifier_subscriptions = NULL;
|
||||
}
|
||||
|
||||
static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
||||
static inline void mmu_notifier_subscriptions_destroy(struct mm_struct *mm)
|
||||
{
|
||||
if (mm_has_notifiers(mm))
|
||||
__mmu_notifier_mm_destroy(mm);
|
||||
__mmu_notifier_subscriptions_destroy(mm);
|
||||
}
|
||||
|
||||
|
||||
@@ -692,11 +692,11 @@ static inline void mmu_notifier_invalidate_range(struct mm_struct *mm,
|
||||
{
|
||||
}
|
||||
|
||||
static inline void mmu_notifier_mm_init(struct mm_struct *mm)
|
||||
static inline void mmu_notifier_subscriptions_init(struct mm_struct *mm)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
||||
static inline void mmu_notifier_subscriptions_destroy(struct mm_struct *mm)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -692,7 +692,7 @@ void __mmdrop(struct mm_struct *mm)
|
||||
WARN_ON_ONCE(mm == current->active_mm);
|
||||
mm_free_pgd(mm);
|
||||
destroy_context(mm);
|
||||
mmu_notifier_mm_destroy(mm);
|
||||
mmu_notifier_subscriptions_destroy(mm);
|
||||
check_mm(mm);
|
||||
put_user_ns(mm->user_ns);
|
||||
free_mm(mm);
|
||||
@@ -1025,7 +1025,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,
|
||||
mm_init_aio(mm);
|
||||
mm_init_owner(mm, p);
|
||||
RCU_INIT_POINTER(mm->exe_file, NULL);
|
||||
mmu_notifier_mm_init(mm);
|
||||
mmu_notifier_subscriptions_init(mm);
|
||||
init_tlb_flush_pending(mm);
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
|
||||
mm->pmd_huge_pte = NULL;
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ void dump_mm(const struct mm_struct *mm)
|
||||
#endif
|
||||
"exe_file %px\n"
|
||||
#ifdef CONFIG_MMU_NOTIFIER
|
||||
"mmu_notifier_mm %px\n"
|
||||
"notifier_subscriptions %px\n"
|
||||
#endif
|
||||
#ifdef CONFIG_NUMA_BALANCING
|
||||
"numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n"
|
||||
@@ -185,7 +185,7 @@ void dump_mm(const struct mm_struct *mm)
|
||||
#endif
|
||||
mm->exe_file,
|
||||
#ifdef CONFIG_MMU_NOTIFIER
|
||||
mm->mmu_notifier_mm,
|
||||
mm->notifier_subscriptions,
|
||||
#endif
|
||||
#ifdef CONFIG_NUMA_BALANCING
|
||||
mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
|
||||
|
||||
+170
-156
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user