Lines Matching refs:source_mm
726 mmap_read_unlock(pages->source_mm); in pfn_reader_user_destroy()
727 if (pages->source_mm != current->mm) in pfn_reader_user_destroy()
728 mmput(pages->source_mm); in pfn_reader_user_destroy()
741 bool remote_mm = pages->source_mm != current->mm; in pfn_reader_user_pin()
766 if (!mmget_not_zero(pages->source_mm)) in pfn_reader_user_pin()
785 mmap_read_lock(pages->source_mm); in pfn_reader_user_pin()
788 rc = pin_user_pages_remote(pages->source_mm, uptr, npages, in pfn_reader_user_pin()
838 mmap_read_unlock(pages->source_mm); in update_mm_locked_vm()
842 pages->source_mm != current->mm) { in update_mm_locked_vm()
843 if (!mmget_not_zero(pages->source_mm)) in update_mm_locked_vm()
848 mmap_write_lock(pages->source_mm); in update_mm_locked_vm()
849 rc = __account_locked_vm(pages->source_mm, npages, inc, in update_mm_locked_vm()
851 mmap_write_unlock(pages->source_mm); in update_mm_locked_vm()
854 mmput(pages->source_mm); in update_mm_locked_vm()
881 atomic64_add(npages, &pages->source_mm->pinned_vm); in do_update_pinned()
883 atomic64_sub(npages, &pages->source_mm->pinned_vm); in do_update_pinned()
1165 pages->source_mm = current->mm; in iopt_alloc_pages()
1166 mmgrab(pages->source_mm); in iopt_alloc_pages()
1190 mmdrop(pages->source_mm); in iopt_release_pages()
1792 if (!mmget_not_zero(pages->source_mm)) in iopt_pages_rw_page()
1801 mmap_read_lock(pages->source_mm); in iopt_pages_rw_page()
1803 pages->source_mm, (uintptr_t)(pages->uptr + index * PAGE_SIZE), in iopt_pages_rw_page()
1806 mmap_read_unlock(pages->source_mm); in iopt_pages_rw_page()
1817 mmput(pages->source_mm); in iopt_pages_rw_page()
1837 bool change_mm = current->mm != pages->source_mm; in iopt_pages_rw_access()
1862 if (!mmget_not_zero(pages->source_mm)) in iopt_pages_rw_access()
1867 kthread_use_mm(pages->source_mm); in iopt_pages_rw_access()
1879 kthread_unuse_mm(pages->source_mm); in iopt_pages_rw_access()
1880 mmput(pages->source_mm); in iopt_pages_rw_access()