ring buffer mmap: remove compatibility code
[lttng-modules.git] / lib / ringbuffer / ring_buffer_mmap.c
index 30dd93ef6375ec5979fb9b45e3d00eb64a01c41e..40fd41ebb9114db84e67133b54f2560184b364aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0-only
  *
  * ring_buffer_mmap.c
  *
@@ -6,7 +6,7 @@
  * Copyright (C) 1999-2005 - Karim Yaghmour <karim@opersys.com>
  * Copyright (C) 2008-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * 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.
  */
 
@@ -20,7 +20,7 @@
 /*
  * fault() vm_op implementation for ring buffer file mapping.
  */
-static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
        struct lib_ring_buffer *buf = vma->vm_private_data;
        struct channel *chan = buf->backend.chan;
@@ -53,18 +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(4,11,0))
-static int lib_ring_buffer_fault(struct vm_fault *vmf)
+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);
 }
-#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.
This page took 0.024343 seconds and 4 git commands to generate.