From: Shaohua Li Date: Fri, 8 Jul 2011 22:39:41 +0000 (-0700) Subject: mm: __tlb_remove_page() check the correct batch X-Git-Tag: upstream/snapshot3+hdmi~9706 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b43c3aab0137595335b08b340a3f3e5af9818a6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mm: __tlb_remove_page() check the correct batch __tlb_remove_page() switches to a new batch page, but still checks space in the old batch. This check always fails, and causes a forced tlb flush. Signed-off-by: Shaohua Li Acked-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index 40b7531..9b8a01d 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -305,6 +305,7 @@ int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) if (batch->nr == batch->max) { if (!tlb_next_batch(tlb)) return 0; + batch = tlb->active; } VM_BUG_ON(batch->nr > batch->max);