diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-05-11 16:27:06 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-05-11 16:27:06 +0200 |
commit | 47319846a9e2ab1c4d22108e891818d003615bd8 (patch) | |
tree | 919dbed5c01d3ad4db009bd38bb12cfd3d038246 /mm/mmu_notifier.c | |
parent | 3d47083b9ff46863e8374ad3bb5edb5e464c75f8 (diff) | |
parent | 672c0c5173427e6b3e2a9bbb7be51ceeec78093a (diff) | |
download | linux-47319846a9e2ab1c4d22108e891818d003615bd8.tar.bz2 |
Merge branch 'v5.18-rc5'
Obtain the new INTEL_FAM6 stuff required.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'mm/mmu_notifier.c')
-rw-r--r-- | mm/mmu_notifier.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 459d195d2ff6..f45ff1b7626a 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c @@ -1036,6 +1036,18 @@ int mmu_interval_notifier_insert_locked( } EXPORT_SYMBOL_GPL(mmu_interval_notifier_insert_locked); +static bool +mmu_interval_seq_released(struct mmu_notifier_subscriptions *subscriptions, + unsigned long seq) +{ + bool ret; + + spin_lock(&subscriptions->lock); + ret = subscriptions->invalidate_seq != seq; + spin_unlock(&subscriptions->lock); + return ret; +} + /** * mmu_interval_notifier_remove - Remove a interval notifier * @interval_sub: Interval subscription to unregister @@ -1083,7 +1095,7 @@ void mmu_interval_notifier_remove(struct mmu_interval_notifier *interval_sub) lock_map_release(&__mmu_notifier_invalidate_range_start_map); if (seq) wait_event(subscriptions->wq, - READ_ONCE(subscriptions->invalidate_seq) != seq); + mmu_interval_seq_released(subscriptions, seq)); /* pairs with mmgrab in mmu_interval_notifier_insert() */ mmdrop(mm); |