Lines Matching refs:ufile

85 struct ib_ucontext *ib_uverbs_get_ucontext_file(struct ib_uverbs_file *ufile)  in ib_uverbs_get_ucontext_file()  argument
92 struct ib_ucontext *ucontext = smp_load_acquire(&ufile->ucontext); in ib_uverbs_get_ucontext_file()
94 if (!srcu_dereference(ufile->device->ib_dev, in ib_uverbs_get_ucontext_file()
95 &ufile->device->disassociate_srcu)) in ib_uverbs_get_ucontext_file()
483 struct ib_uverbs_file *uverbs_file = async_file->uobj.ufile; in ib_uverbs_init_async_event_file()
605 bundle.ufile = file; in ib_uverbs_write()
707 struct ib_uverbs_file *ufile = vma->vm_file->private_data; in rdma_umap_open() local
715 if (!down_read_trylock(&ufile->hw_destroy_rwsem)) in rdma_umap_open()
720 if (!ufile->ucontext) in rdma_umap_open()
728 up_read(&ufile->hw_destroy_rwsem); in rdma_umap_open()
732 up_read(&ufile->hw_destroy_rwsem); in rdma_umap_open()
745 struct ib_uverbs_file *ufile = vma->vm_file->private_data; in rdma_umap_close() local
756 mutex_lock(&ufile->umap_lock); in rdma_umap_close()
761 mutex_unlock(&ufile->umap_lock); in rdma_umap_close()
771 struct ib_uverbs_file *ufile = vmf->vma->vm_file->private_data; in rdma_umap_fault() local
785 mutex_lock(&ufile->umap_lock); in rdma_umap_fault()
786 if (!ufile->disassociate_page) in rdma_umap_fault()
787 ufile->disassociate_page = in rdma_umap_fault()
790 if (ufile->disassociate_page) { in rdma_umap_fault()
795 vmf->page = ufile->disassociate_page; in rdma_umap_fault()
800 mutex_unlock(&ufile->umap_lock); in rdma_umap_fault()
811 void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile) in uverbs_user_mmap_disassociate() argument
815 lockdep_assert_held(&ufile->hw_destroy_rwsem); in uverbs_user_mmap_disassociate()
821 mutex_lock(&ufile->umap_lock); in uverbs_user_mmap_disassociate()
822 while (!list_empty(&ufile->umaps)) { in uverbs_user_mmap_disassociate()
825 priv = list_first_entry(&ufile->umaps, in uverbs_user_mmap_disassociate()
840 mutex_unlock(&ufile->umap_lock); in uverbs_user_mmap_disassociate()
851 mutex_lock(&ufile->umap_lock); in uverbs_user_mmap_disassociate()
852 list_for_each_entry_safe (priv, next_priv, &ufile->umaps, in uverbs_user_mmap_disassociate()
868 mutex_unlock(&ufile->umap_lock); in uverbs_user_mmap_disassociate()