diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-02-26 08:39:26 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-02-26 08:41:15 +0100 |
| commit | 3f7df3efeb415610d27aecc282ff96d4a22f0168 (patch) | |
| tree | 0f66382746a1311043a25320243ff5f4b10c282e /kernel/fork.c | |
| parent | x86/mm: Optimize boot-time paging mode switching cost (diff) | |
| parent | Linux 4.16-rc3 (diff) | |
| download | linux-3f7df3efeb415610d27aecc282ff96d4a22f0168.tar.gz linux-3f7df3efeb415610d27aecc282ff96d4a22f0168.zip | |
Merge tag 'v4.16-rc3' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index be8aa5b98666..e5d9d405ae4e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -592,7 +592,7 @@ static void check_mm(struct mm_struct *mm) * is dropped: either by a lazy thread or by * mmput. Free the page directory and the mm. */ -static void __mmdrop(struct mm_struct *mm) +void __mmdrop(struct mm_struct *mm) { BUG_ON(mm == &init_mm); mm_free_pgd(mm); @@ -603,18 +603,7 @@ static void __mmdrop(struct mm_struct *mm) put_user_ns(mm->user_ns); free_mm(mm); } - -void mmdrop(struct mm_struct *mm) -{ - /* - * The implicit full barrier implied by atomic_dec_and_test() is - * required by the membarrier system call before returning to - * user-space, after storing to rq->curr. - */ - if (unlikely(atomic_dec_and_test(&mm->mm_count))) - __mmdrop(mm); -} -EXPORT_SYMBOL_GPL(mmdrop); +EXPORT_SYMBOL_GPL(__mmdrop); static void mmdrop_async_fn(struct work_struct *work) { |
