X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fringbuffer%2Fring_buffer_mmap.c;h=392157a05fa0a8d56a5e8062994c13b54d6ca180;hb=e20c0fec4a2e120143f2e71c63d9fcd664af55a4;hp=34174a587ab4af1a8d601d752a89ae31e92a4b29;hpb=cfa6cc1d0f01c2cfcc1a679abf3a6572d411c309;p=lttng-modules.git diff --git a/src/lib/ringbuffer/ring_buffer_mmap.c b/src/lib/ringbuffer/ring_buffer_mmap.c index 34174a58..392157a0 100644 --- a/src/lib/ringbuffer/ring_buffer_mmap.c +++ b/src/lib/ringbuffer/ring_buffer_mmap.c @@ -20,15 +20,15 @@ /* * fault() vm_op implementation for ring buffer file mapping. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0)) static vm_fault_t lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf) #else static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf) #endif { - struct lib_ring_buffer *buf = vma->vm_private_data; - struct channel *chan = buf->backend.chan; - const struct lib_ring_buffer_config *config = &chan->backend.config; + struct lttng_kernel_ring_buffer *buf = vma->vm_private_data; + struct lttng_kernel_ring_buffer_channel *chan = buf->backend.chan; + const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config; pgoff_t pgoff = vmf->pgoff; unsigned long *pfnp; void **virt; @@ -57,24 +57,24 @@ static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fa return 0; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0)) static vm_fault_t lib_ring_buffer_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; return lib_ring_buffer_fault_compat(vma, vmf); } -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) static int lib_ring_buffer_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; return lib_ring_buffer_fault_compat(vma, vmf); } -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */ +#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */ static int lib_ring_buffer_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { return lib_ring_buffer_fault_compat(vma, vmf); } -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */ +#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */ /* * vm_ops for ring buffer file mappings. @@ -92,12 +92,12 @@ static const struct vm_operations_struct lib_ring_buffer_mmap_ops = { * * Caller should already have grabbed mmap_sem. */ -static int lib_ring_buffer_mmap_buf(struct lib_ring_buffer *buf, +static int lib_ring_buffer_mmap_buf(struct lttng_kernel_ring_buffer *buf, struct vm_area_struct *vma) { unsigned long length = vma->vm_end - vma->vm_start; - struct channel *chan = buf->backend.chan; - const struct lib_ring_buffer_config *config = &chan->backend.config; + struct lttng_kernel_ring_buffer_channel *chan = buf->backend.chan; + const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config; unsigned long mmap_buf_len; if (config->output != RING_BUFFER_MMAP) @@ -118,7 +118,7 @@ static int lib_ring_buffer_mmap_buf(struct lib_ring_buffer *buf, } int lib_ring_buffer_mmap(struct file *filp, struct vm_area_struct *vma, - struct lib_ring_buffer *buf) + struct lttng_kernel_ring_buffer *buf) { return lib_ring_buffer_mmap_buf(buf, vma); } @@ -133,7 +133,7 @@ EXPORT_SYMBOL_GPL(lib_ring_buffer_mmap); */ int vfs_lib_ring_buffer_mmap(struct file *filp, struct vm_area_struct *vma) { - struct lib_ring_buffer *buf = filp->private_data; + struct lttng_kernel_ring_buffer *buf = filp->private_data; return lib_ring_buffer_mmap(filp, vma, buf); } EXPORT_SYMBOL_GPL(vfs_lib_ring_buffer_mmap);