diff options
author | Rob Herring <robh@kernel.org> | 2015-02-04 11:43:01 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2015-02-04 11:43:01 -0500 |
commit | 962a70d05edac2e2eb53cd077715930083964b9e (patch) | |
tree | f0b3a7bd574b2edfa76ce960e7f8630aea77e257 /mm | |
parent | 10638a4ed2b8618f20fabf9ed19df60a68446e90 (diff) | |
parent | 26bc420b59a38e4e6685a73345a0def461136dce (diff) |
Merge tag 'v3.19-rc6' into HEAD
Linux 3.19-rc6
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index c6565f00fb38..54f3a9b00956 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -235,6 +235,9 @@ void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long | |||
235 | 235 | ||
236 | static void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb) | 236 | static void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb) |
237 | { | 237 | { |
238 | if (!tlb->end) | ||
239 | return; | ||
240 | |||
238 | tlb_flush(tlb); | 241 | tlb_flush(tlb); |
239 | mmu_notifier_invalidate_range(tlb->mm, tlb->start, tlb->end); | 242 | mmu_notifier_invalidate_range(tlb->mm, tlb->start, tlb->end); |
240 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | 243 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE |
@@ -247,7 +250,7 @@ static void tlb_flush_mmu_free(struct mmu_gather *tlb) | |||
247 | { | 250 | { |
248 | struct mmu_gather_batch *batch; | 251 | struct mmu_gather_batch *batch; |
249 | 252 | ||
250 | for (batch = &tlb->local; batch; batch = batch->next) { | 253 | for (batch = &tlb->local; batch && batch->nr; batch = batch->next) { |
251 | free_pages_and_swap_cache(batch->pages, batch->nr); | 254 | free_pages_and_swap_cache(batch->pages, batch->nr); |
252 | batch->nr = 0; | 255 | batch->nr = 0; |
253 | } | 256 | } |
@@ -256,9 +259,6 @@ static void tlb_flush_mmu_free(struct mmu_gather *tlb) | |||
256 | 259 | ||
257 | void tlb_flush_mmu(struct mmu_gather *tlb) | 260 | void tlb_flush_mmu(struct mmu_gather *tlb) |
258 | { | 261 | { |
259 | if (!tlb->end) | ||
260 | return; | ||
261 | |||
262 | tlb_flush_mmu_tlbonly(tlb); | 262 | tlb_flush_mmu_tlbonly(tlb); |
263 | tlb_flush_mmu_free(tlb); | 263 | tlb_flush_mmu_free(tlb); |
264 | } | 264 | } |