diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-08-23 18:47:08 +1000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-12-16 22:08:52 +0000 |
commit | 32e0dc1b86fad6e0da8691c90af2e0d2a1160329 (patch) | |
tree | 7fb7338c8c6dd7bd1b842d59d76c4b1fded6c862 /mm | |
parent | 15ed746c6d50f0f84b2bcdf1219782e4bbdc7585 (diff) | |
download | linux-stable-32e0dc1b86fad6e0da8691c90af2e0d2a1160329.tar.gz linux-stable-32e0dc1b86fad6e0da8691c90af2e0d2a1160329.tar.bz2 linux-stable-32e0dc1b86fad6e0da8691c90af2e0d2a1160329.zip |
mm: move tlb_table_flush to tlb_flush_mmu_free
commit db7ddef301128dad394f1c0f77027f86ee9a4edb upstream.
There is no need to call this from tlb_flush_mmu_tlbonly, it logically
belongs with tlb_flush_mmu_free. This makes future fixes simpler.
[ This was originally done to allow code consolidation for the
mmu_notifier fix, but it also ends up helping simplify the
HAVE_RCU_TABLE_INVALIDATE fix. - Linus ]
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index 06e065489e60..582d689c12b6 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -236,15 +236,15 @@ static void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb) { tlb->need_flush = 0; tlb_flush(tlb); -#ifdef CONFIG_HAVE_RCU_TABLE_FREE - tlb_table_flush(tlb); -#endif } static void tlb_flush_mmu_free(struct mmu_gather *tlb) { struct mmu_gather_batch *batch; +#ifdef CONFIG_HAVE_RCU_TABLE_FREE + tlb_table_flush(tlb); +#endif for (batch = &tlb->local; batch; batch = batch->next) { free_pages_and_swap_cache(batch->pages, batch->nr); batch->nr = 0; |