summaryrefslogtreecommitdiff
path: root/mm/memory.c
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2010-08-02 20:41:05 +0200
committerAndrea Arcangeli <aarcange@redhat.com>2010-08-02 18:43:09 +0000
commit98c0053d7d18cf63c2d1d512d27403277cad5665 (patch)
tree7a83f0c08f4c621ffac38b2f3584607fd447d9b9 /mm/memory.c
parent6016dac4d817ecfcd25fd52faa5310b20121802e (diff)
export maybe_mkwrite
huge_memory.c needs it too when it fallbacks in copying hugepages into regular fragmented pages if hugepage allocation fails during COW. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Rik van Riel <riel@redhat.com> Acked-by: Mel Gorman <mel@csn.ul.ie>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 06f015f94e87..4e1d0a9034d6 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2050,19 +2050,6 @@ static inline int pte_unmap_same(struct mm_struct *mm, pmd_t *pmd,
return same;
}
-/*
- * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when
- * servicing faults for write access. In the normal case, do always want
- * pte_mkwrite. But get_user_pages can cause write faults for mappings
- * that do not have writing enabled, when used by access_process_vm.
- */
-static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
-{
- if (likely(vma->vm_flags & VM_WRITE))
- pte = pte_mkwrite(pte);
- return pte;
-}
-
static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va, struct vm_area_struct *vma)
{
/*