From: Michael Jeanson Date: Fri, 18 Nov 2022 21:28:56 +0000 (-0500) Subject: Drop support for kernels < 4.4 from 'wrapper/mm.h' X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=686eb00593241450a0bd19faa68c0725abd63b0c;p=lttng-modules.git Drop support for kernels < 4.4 from 'wrapper/mm.h' Change-Id: I9bdbecf08654d699f8f45fbc7ba862b1fbd822eb Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/wrapper/mm.h b/include/wrapper/mm.h index d3bdda66..f7e8e87e 100644 --- a/include/wrapper/mm.h +++ b/include/wrapper/mm.h @@ -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 */ diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c index 9a339be0..2b88b11c 100644 --- a/src/lib/ringbuffer/ring_buffer_backend.c +++ b/src/lib/ringbuffer/ring_buffer_backend.c @@ -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; }