diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2010-12-15 05:05:13 +0100 |
---|---|---|
committer | Andrea Arcangeli <aarcange@redhat.com> | 2010-12-15 04:34:28 +0000 |
commit | 397bb3583d5dc1e9899a40e0358e33f5a494dd80 (patch) | |
tree | 933b1e6864a844b78a50eacaeb10628126898c2f /mm | |
parent | b7459e7c517da0e7032e7b95d96e8336792bba52 (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')
-rw-r--r-- | mm/memory.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/mm/memory.c b/mm/memory.c index 02e48aa0ed13..2cb137a8a6a6 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2048,19 +2048,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) { /* |