Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- mm/mmu_notifier.c | 79 ++++++++++++++++++++++++++----------------------------
- 1 file changed, 39 insertions(+), 40 deletions(-)
+ mm/mmu_notifier.c | 80 +++++++++++++++++++++++++++---------------------------
+ 1 file changed, 40 insertions(+), 40 deletions(-)
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
-@@ -40,48 +40,44 @@ void __mmu_notifier_release(struct mm_st
+@@ -37,51 +37,48 @@ static struct srcu_struct srcu;
+ void __mmu_notifier_release(struct mm_struct *mm)
+ {
+ struct mmu_notifier *mn;
++ struct hlist_node *node;
int id;
/*
+ * ->release returns.
*/
id = srcu_read_lock(&srcu);
-+ hlist_for_each_entry_rcu(mn, &mm->mmu_notifier_mm->list, hlist)
++ hlist_for_each_entry_rcu(mn, node, &mm->mmu_notifier_mm->list, hlist)
+ /*
+ * If ->release runs before mmu_notifier_unregister it must be
+ * handled, as it's the only way for the driver to flush all
*/
synchronize_srcu(&srcu);
}
-@@ -302,31 +298,34 @@ void mmu_notifier_unregister(struct mmu_
+@@ -302,31 +299,34 @@ void mmu_notifier_unregister(struct mmu_
{
BUG_ON(atomic_read(&mm->mm_count) <= 0);
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- mm/mmu_notifier.c | 79 ++++++++++++++++++++++++++----------------------------
- 1 file changed, 39 insertions(+), 40 deletions(-)
+ mm/mmu_notifier.c | 80 +++++++++++++++++++++++++++---------------------------
+ 1 file changed, 40 insertions(+), 40 deletions(-)
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
-@@ -40,48 +40,44 @@ void __mmu_notifier_release(struct mm_st
+@@ -37,51 +37,48 @@ static struct srcu_struct srcu;
+ void __mmu_notifier_release(struct mm_struct *mm)
+ {
+ struct mmu_notifier *mn;
++ struct hlist_node *node;
int id;
/*
+ * ->release returns.
*/
id = srcu_read_lock(&srcu);
-+ hlist_for_each_entry_rcu(mn, &mm->mmu_notifier_mm->list, hlist)
++ hlist_for_each_entry_rcu(mn, node, &mm->mmu_notifier_mm->list, hlist)
+ /*
+ * If ->release runs before mmu_notifier_unregister it must be
+ * handled, as it's the only way for the driver to flush all
*/
synchronize_srcu(&srcu);
}
-@@ -302,31 +298,34 @@ void mmu_notifier_unregister(struct mmu_
+@@ -302,31 +299,34 @@ void mmu_notifier_unregister(struct mmu_
{
BUG_ON(atomic_read(&mm->mm_count) <= 0);