]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/mmu_notifier.c
net: tcp: Permit user set TCP_MAXSEG to default value
[karo-tx-linux.git] / mm / mmu_notifier.c
index f4259e496f83a6d0465bba0a95e918980395030f..a7652acd2ab93c2e290f31fbe80e36d157abb609 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/srcu.h>
 #include <linux/rcupdate.h>
 #include <linux/sched.h>
+#include <linux/sched/mm.h>
 #include <linux/slab.h>
 
 /* global SRCU for all MMs */
@@ -275,7 +276,7 @@ static int do_mmu_notifier_register(struct mmu_notifier *mn,
                mm->mmu_notifier_mm = mmu_notifier_mm;
                mmu_notifier_mm = NULL;
        }
-       atomic_inc(&mm->mm_count);
+       mmgrab(mm);
 
        /*
         * Serialize the update against mmu_notifier_unregister. A