lkml.org 
[lkml]   [2015]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm: change tlb_finish_mmu() to be more simple
Date
This patch remove unneeded *next temp variable,
make this function more simple to read.

Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
mm/memory.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 7f3b9f2..f0040ed 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -270,17 +270,16 @@ void tlb_flush_mmu(struct mmu_gather *tlb)
*/
void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
{
- struct mmu_gather_batch *batch, *next;
+ struct mmu_gather_batch *batch;

tlb_flush_mmu(tlb);

/* keep the page table cache within bounds */
check_pgt_cache();

- for (batch = tlb->local.next; batch; batch = next) {
- next = batch->next;
+ for (batch = tlb->local.next; batch; batch = batch->next)
free_pages((unsigned long)batch, 0);
- }
+
tlb->local.next = NULL;
}

--
1.9.1


\
 
 \ /
  Last update: 2015-11-04 09:01    [W:0.040 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site