wrapper: remove splice_to_pipe wrapper
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Apr 2020 16:23:25 +0000 (12:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Apr 2020 16:25:23 +0000 (12:25 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/Kbuild
lib/ringbuffer/ring_buffer_splice.c
wrapper/splice.c [deleted file]
wrapper/splice.h [deleted file]

index eb420800b9785bed80aaf900e6a62ee006a9a6a3..6c7311361f98ee86c73f173f07b7e28ee6840e5a 100644 (file)
@@ -15,7 +15,6 @@ lttng-lib-ring-buffer-objs := \
   ringbuffer/ring_buffer_vfs.o \
   ringbuffer/ring_buffer_splice.o \
   ringbuffer/ring_buffer_mmap.o \
-  prio_heap/lttng_prio_heap.o \
-  ../wrapper/splice.o
+  prio_heap/lttng_prio_heap.o
 
 # vim:syntax=make
index f0b5479a8b8bfb993b29da4d3c0db3e708d76385..9695b9fe9464f3f047f216681832b62764b0cb9f 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/version.h>
+#include <linux/splice.h>
 
-#include <wrapper/splice.h>
 #include <wrapper/ringbuffer/backend.h>
 #include <wrapper/ringbuffer/frontend.h>
 #include <wrapper/ringbuffer/vfs.h>
@@ -152,7 +152,7 @@ static int subbuf_splice_actor(struct file *in,
        if (!spd.nr_pages)
                return 0;
 
-       return wrapper_splice_to_pipe(pipe, &spd);
+       return splice_to_pipe(pipe, &spd);
 }
 
 ssize_t lib_ring_buffer_splice_read(struct file *in, loff_t *ppos,
diff --git a/wrapper/splice.c b/wrapper/splice.c
deleted file mode 100644 (file)
index 96fdf1d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/splice.c
- *
- * wrapper around splice_to_pipe. Using KALLSYMS to get its address when
- * available, else we need to have a kernel that exports this function to GPL
- * modules. The export was introduced in kernel 4.2.
- *
- * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#include <lttng-kernel-version.h>
-
-#if (defined(CONFIG_KALLSYMS) \
-       && (LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)))
-
-#include <linux/kallsyms.h>
-#include <linux/fs.h>
-#include <linux/splice.h>
-#include <wrapper/kallsyms.h>
-
-static
-ssize_t (*splice_to_pipe_sym)(struct pipe_inode_info *pipe,
-                             struct splice_pipe_desc *spd);
-
-ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe,
-                              struct splice_pipe_desc *spd)
-{
-       if (!splice_to_pipe_sym)
-               splice_to_pipe_sym = (void *) kallsyms_lookup_funcptr("splice_to_pipe");
-       if (splice_to_pipe_sym) {
-               return splice_to_pipe_sym(pipe, spd);
-       } else {
-               printk_once(KERN_WARNING "LTTng: splice_to_pipe symbol lookup failed.\n");
-               return -ENOSYS;
-       }
-}
-
-#else
-
-#include <linux/fs.h>
-#include <linux/splice.h>
-
-ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe,
-                              struct splice_pipe_desc *spd)
-{
-       return splice_to_pipe(pipe, spd);
-}
-
-#endif
diff --git a/wrapper/splice.h b/wrapper/splice.h
deleted file mode 100644 (file)
index a42bd6f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/splice.h
- *
- * wrapper around splice_to_pipe. Using KALLSYMS to get its address when
- * available, else we need to have a kernel that exports this function to GPL
- * modules.
- *
- * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_SPLICE_H
-#define _LTTNG_WRAPPER_SPLICE_H
-
-#include <linux/splice.h>
-
-ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe,
-                              struct splice_pipe_desc *spd);
-
-#ifndef PIPE_DEF_BUFFERS
-#define PIPE_DEF_BUFFERS 16
-#endif
-
-#endif /* _LTTNG_WRAPPER_SPLICE_H */
This page took 0.028202 seconds and 4 git commands to generate.