X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fring_buffer_mmap.c;h=def29b18a9c335ad89cfd4ecbbf161572c7244b6;hb=5760f3f4e64af16249a4f208e680c7dcffb4f990;hp=fab945887855c0eb20967721b3cdc0b3f5dd21fb;hpb=2ca0c84f0b4a915c555a0b83102d94ac941619ca;p=lttng-modules.git diff --git a/lib/ringbuffer/ring_buffer_mmap.c b/lib/ringbuffer/ring_buffer_mmap.c index fab94588..def29b18 100644 --- a/lib/ringbuffer/ring_buffer_mmap.c +++ b/lib/ringbuffer/ring_buffer_mmap.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 +/* SPDX-License-Identifier: GPL-2.0-only * * ring_buffer_mmap.c * @@ -6,25 +6,21 @@ * Copyright (C) 1999-2005 - Karim Yaghmour * Copyright (C) 2008-2012 - Mathieu Desnoyers * - * Re-using code from kernel/relay.c, hence the GPL-2.0 license for this + * Re-using code from kernel/relay.c, hence the GPL-2.0-only license for this * file. */ #include #include -#include -#include -#include +#include +#include +#include /* * fault() vm_op implementation for ring buffer file mapping. */ -#if (LINUX_VERSION_CODE >= 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; @@ -57,24 +53,11 @@ 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)) 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)) -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)) */ -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)) */ /* * vm_ops for ring buffer file mappings.