Lines Matching refs:cvm_ops
127 struct coda_vm_ops *cvm_ops = in coda_vm_open() local
130 refcount_inc(&cvm_ops->refcnt); in coda_vm_open()
132 if (cvm_ops->host_vm_ops && cvm_ops->host_vm_ops->open) in coda_vm_open()
133 cvm_ops->host_vm_ops->open(vma); in coda_vm_open()
139 struct coda_vm_ops *cvm_ops = in coda_vm_close() local
142 if (cvm_ops->host_vm_ops && cvm_ops->host_vm_ops->close) in coda_vm_close()
143 cvm_ops->host_vm_ops->close(vma); in coda_vm_close()
145 if (refcount_dec_and_test(&cvm_ops->refcnt)) { in coda_vm_close()
146 vma->vm_ops = cvm_ops->host_vm_ops; in coda_vm_close()
147 fput(cvm_ops->coda_file); in coda_vm_close()
148 kfree(cvm_ops); in coda_vm_close()
160 struct coda_vm_ops *cvm_ops; in coda_file_mmap() local
180 cvm_ops = kmalloc(sizeof(struct coda_vm_ops), GFP_KERNEL); in coda_file_mmap()
181 if (!cvm_ops) in coda_file_mmap()
194 kfree(cvm_ops); in coda_file_mmap()
211 kfree(cvm_ops); in coda_file_mmap()
214 cvm_ops->host_vm_ops = vma->vm_ops; in coda_file_mmap()
216 cvm_ops->vm_ops = *vma->vm_ops; in coda_file_mmap()
218 cvm_ops->vm_ops.open = coda_vm_open; in coda_file_mmap()
219 cvm_ops->vm_ops.close = coda_vm_close; in coda_file_mmap()
220 cvm_ops->coda_file = coda_file; in coda_file_mmap()
221 refcount_set(&cvm_ops->refcnt, 1); in coda_file_mmap()
223 vma->vm_ops = &cvm_ops->vm_ops; in coda_file_mmap()