Drop support for kernels < 4.4 from 'wrapper/mm.h'
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 18 Nov 2022 21:28:56 +0000 (16:28 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 23 Nov 2022 20:03:14 +0000 (15:03 -0500)
Change-Id: I9bdbecf08654d699f8f45fbc7ba862b1fbd822eb
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/wrapper/mm.h
src/lib/ringbuffer/ring_buffer_backend.c

index d3bdda66e9987d35ebfb09e08d8ec844eece2071..f7e8e87e6ee17fe8580ab598bd15309b40bd6eed 100644 (file)
@@ -40,31 +40,4 @@ bool wrapper_check_enough_free_pages(unsigned long num_pages)
 }
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
-static inline
-void wrapper_set_current_oom_origin(void)
-{
-       return set_current_oom_origin();
-}
-
-static inline
-void wrapper_clear_current_oom_origin(void)
-{
-       return clear_current_oom_origin();
-}
-
-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
-
-static inline
-void wrapper_set_current_oom_origin(void)
-{
-       return;
-}
-
-static inline
-void wrapper_clear_current_oom_origin(void)
-{
-       return;
-}
-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 #endif /* _LTTNG_WRAPPER_MM_H */
index 9a339be0a6e9b7040abce39b9585a2f2e5d95f48..2b88b11c1e19efe21fcff40e81c2c87d7b468b16 100644 (file)
@@ -61,7 +61,7 @@ int lib_ring_buffer_backend_allocate(const struct lttng_kernel_ring_buffer_confi
         * end up running out of memory because of this buffer allocation, we
         * want to kill the offending app first.
         */
-       wrapper_set_current_oom_origin();
+       set_current_oom_origin();
 
        num_pages_per_subbuf = num_pages >> get_count_order(num_subbuf);
        subbuf_size = chanb->subbuf_size;
@@ -157,7 +157,7 @@ int lib_ring_buffer_backend_allocate(const struct lttng_kernel_ring_buffer_confi
         * will not fault.
         */
        wrapper_vmalloc_sync_mappings();
-       wrapper_clear_current_oom_origin();
+       clear_current_oom_origin();
        vfree(pages);
        return 0;
 
@@ -174,7 +174,7 @@ depopulate:
 array_error:
        vfree(pages);
 pages_error:
-       wrapper_clear_current_oom_origin();
+       clear_current_oom_origin();
 not_enough_pages:
        return -ENOMEM;
 }
This page took 0.027617 seconds and 4 git commands to generate.