8 #include <linux/export.h>
13 #include <linux/mman.h>
20 #include <asm/mmu_context.h>
21 #include <asm/cacheflush.h>
22 #include <asm/tlbflush.h>
42 update_hiwater_rss(mm);
57 unsigned long addr,
unsigned long pgoff,
pgprot_t prot)
63 pte = get_locked_pte(mm, addr, &ptl);
68 zap_pte(mm, vma, addr, pte);
78 pte_unmap_unlock(pte, ptl);
91 err = install_file_pte(mm, vma, addr, pgoff, vma->
vm_page_prot);
125 unsigned long, prot,
unsigned long, pgoff,
unsigned long,
flags)
131 int has_write_lock = 0;
150 #if PTE_FILE_MAX_BITS < BITS_PER_LONG
166 if (!vma || !(vma->
vm_flags & VM_SHARED))
179 if (!(vma->
vm_flags & VM_NONLINEAR)) {
181 if (pgoff == linear_page_index(vma,
start)) {
186 if (!has_write_lock) {
192 mapping = vma->
vm_file->f_mapping;
198 if (mapping_cap_account_dirty(mapping)) {
217 vma_interval_tree_remove(vma, &mapping->
i_mmap);
257 if (
likely(!has_write_lock))