Lines Matching defs:ufile

95  * Must be called with the ufile->device->disassociate_srcu held, and the lock
98 struct ib_ucontext *ib_uverbs_get_ucontext_file(struct ib_uverbs_file *ufile)
105 struct ib_ucontext *ucontext = smp_load_acquire(&ufile->ucontext);
107 if (!srcu_dereference(ufile->device->ib_dev,
108 &ufile->device->disassociate_srcu))
493 struct ib_uverbs_file *uverbs_file = async_file->uobj.ufile;
615 bundle.ufile = file;
722 struct ib_uverbs_file *ufile = vma->vm_file->private_data;
730 if (!down_read_trylock(&ufile->hw_destroy_rwsem))
732 mutex_lock(&ufile->disassociation_lock);
737 if (!ufile->ucontext)
745 mutex_unlock(&ufile->disassociation_lock);
746 up_read(&ufile->hw_destroy_rwsem);
750 mutex_unlock(&ufile->disassociation_lock);
751 up_read(&ufile->hw_destroy_rwsem);
764 struct ib_uverbs_file *ufile = vma->vm_file->private_data;
775 mutex_lock(&ufile->umap_lock);
780 mutex_unlock(&ufile->umap_lock);
790 struct ib_uverbs_file *ufile = vmf->vma->vm_file->private_data;
804 mutex_lock(&ufile->umap_lock);
805 if (!ufile->disassociate_page)
806 ufile->disassociate_page =
809 if (ufile->disassociate_page) {
814 vmf->page = ufile->disassociate_page;
819 mutex_unlock(&ufile->umap_lock);
830 void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
834 mutex_lock(&ufile->disassociation_lock);
840 mutex_lock(&ufile->umap_lock);
841 while (!list_empty(&ufile->umaps)) {
844 priv = list_first_entry(&ufile->umaps,
859 mutex_unlock(&ufile->umap_lock);
861 mutex_unlock(&ufile->disassociation_lock);
872 mutex_lock(&ufile->umap_lock);
873 list_for_each_entry_safe (priv, next_priv, &ufile->umaps,
889 mutex_unlock(&ufile->umap_lock);
894 mutex_unlock(&ufile->disassociation_lock);
908 struct ib_uverbs_file *ufile;
911 list_for_each_entry(ufile, &uverbs_dev->uverbs_file_list, list) {
912 if (ufile->ucontext)
913 uverbs_user_mmap_disassociate(ufile);