Lines Matching refs:vma
101 static void shm_open(struct vm_area_struct *vma);
102 static void shm_close(struct vm_area_struct *vma);
301 static void shm_open(struct vm_area_struct *vma) in shm_open() argument
303 struct file *file = vma->vm_file; in shm_open()
309 sfd->vm_ops->open(vma); in shm_open()
395 static void shm_close(struct vm_area_struct *vma) in shm_close() argument
397 struct file *file = vma->vm_file; in shm_close()
402 sfd->vm_ops->close(vma); in shm_close()
536 struct file *file = vmf->vma->vm_file; in shm_fault()
542 static int shm_may_split(struct vm_area_struct *vma, unsigned long addr) in shm_may_split() argument
544 struct file *file = vma->vm_file; in shm_may_split()
548 return sfd->vm_ops->may_split(vma, addr); in shm_may_split()
553 static unsigned long shm_pagesize(struct vm_area_struct *vma) in shm_pagesize() argument
555 struct file *file = vma->vm_file; in shm_pagesize()
559 return sfd->vm_ops->pagesize(vma); in shm_pagesize()
565 static int shm_set_policy(struct vm_area_struct *vma, struct mempolicy *new) in shm_set_policy() argument
567 struct file *file = vma->vm_file; in shm_set_policy()
572 err = sfd->vm_ops->set_policy(vma, new); in shm_set_policy()
576 static struct mempolicy *shm_get_policy(struct vm_area_struct *vma, in shm_get_policy() argument
579 struct file *file = vma->vm_file; in shm_get_policy()
584 pol = sfd->vm_ops->get_policy(vma, addr); in shm_get_policy()
585 else if (vma->vm_policy) in shm_get_policy()
586 pol = vma->vm_policy; in shm_get_policy()
592 static int shm_mmap(struct file *file, struct vm_area_struct *vma) in shm_mmap() argument
606 ret = call_mmap(sfd->file, vma); in shm_mmap()
611 sfd->vm_ops = vma->vm_ops; in shm_mmap()
615 vma->vm_ops = &shm_vm_ops; in shm_mmap()
1734 struct vm_area_struct *vma; in ksys_shmdt() local
1772 for_each_vma(vmi, vma) { in ksys_shmdt()
1778 if ((vma->vm_ops == &shm_vm_ops) && in ksys_shmdt()
1779 (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) { in ksys_shmdt()
1787 file = vma->vm_file; in ksys_shmdt()
1788 size = i_size_read(file_inode(vma->vm_file)); in ksys_shmdt()
1789 do_vma_munmap(&vmi, vma, vma->vm_start, vma->vm_end, in ksys_shmdt()
1798 vma = vma_next(&vmi); in ksys_shmdt()
1809 while (vma && (loff_t)(vma->vm_end - addr) <= size) { in ksys_shmdt()
1811 if ((vma->vm_ops == &shm_vm_ops) && in ksys_shmdt()
1812 ((vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) && in ksys_shmdt()
1813 (vma->vm_file == file)) { in ksys_shmdt()
1814 do_vma_munmap(&vmi, vma, vma->vm_start, vma->vm_end, in ksys_shmdt()
1818 vma = vma_next(&vmi); in ksys_shmdt()
1822 vma = vma_lookup(mm, addr); in ksys_shmdt()
1826 if (vma && vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) { in ksys_shmdt()
1827 do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start, NULL); in ksys_shmdt()