From 701dfbc1cbdd42b814dd76a885c4b73f97011d08 Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Mon, 29 Jan 2007 21:24:08 +0000 Subject: [PATCH] mm: mremap correct rmap accounting Nick Piggin points out that page accounting on MIPS multiple ZERO_PAGEs is not maintained by its move_pte, and could lead to freeing a ZERO_PAGE. Instead of complicating that move_pte, just forget the minor optimization when mremapping, and change the one thing which needed it for correctness - filemap_xip use ZERO_PAGE(0) throughout instead of according to address. [ "There is no block device driver one could use for XIP on mips platforms" - Carsten Otte ] Signed-off-by: Hugh Dickins Cc: Nick Piggin Cc: Andrew Morton Cc: Ralf Baechle Cc: Carsten Otte Signed-off-by: Linus Torvalds --- mm/mremap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'mm/mremap.c') diff --git a/mm/mremap.c b/mm/mremap.c index 9c769fa29f3..5d4bd4f95b8 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -105,7 +105,6 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, if (pte_none(*old_pte)) continue; pte = ptep_clear_flush(vma, old_addr, old_pte); - /* ZERO_PAGE can be dependant on virtual addr */ pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); set_pte_at(mm, new_addr, new_pte, pte); } -- cgit v1.2.3-70-g09d2