[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1408831921-10168-4-git-send-email-pfeiner@google.com>
Date: Sat, 23 Aug 2014 18:12:01 -0400
From: Peter Feiner <pfeiner@...gle.com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, Peter Feiner <pfeiner@...gle.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
Pavel Emelyanov <xemul@...allels.com>,
Jamie Liu <jamieliu@...gle.com>,
Hugh Dickins <hughd@...gle.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH v2 3/3] mm: mmap: cleanup code that preserves special vm_page_prot bits
Replace logic that has been factored out into a utility method.
Signed-off-by: Peter Feiner <pfeiner@...gle.com>
---
mm/mmap.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index abcac32..c18c49a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1618,20 +1618,8 @@ munmap_back:
goto free_vma;
}
- if (vma_wants_writenotify(vma)) {
- pgprot_t pprot = vma->vm_page_prot;
-
- /* Can vma->vm_page_prot have changed??
- *
- * Answer: Yes, drivers may have changed it in their
- * f_op->mmap method.
- *
- * Ensures that vmas marked as uncached stay that way.
- */
- vma->vm_page_prot = vm_get_page_prot(vm_flags & ~VM_SHARED);
- if (pgprot_val(pprot) == pgprot_val(pgprot_noncached(pprot)))
- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
- }
+ if (vma_wants_writenotify(vma))
+ vma_enable_writenotify(vma);
vma_link(mm, vma, prev, rb_link, rb_parent);
/* Once vma denies write, undo our temporary denial count */
--
2.1.0.rc2.206.gedb03e5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists