splice: make do_splice public
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 24 Feb 2020 08:32:43 +0000 (11:32 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Mar 2020 21:04:31 +0000 (14:04 -0700)
Make do_splice(), so other kernel parts can reuse it

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/splice.c
include/linux/splice.h

index d671936..4735def 100644 (file)
@@ -1109,9 +1109,9 @@ static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
 /*
  * Determine where to splice to/from.
  */
-static long do_splice(struct file *in, loff_t __user *off_in,
-                     struct file *out, loff_t __user *off_out,
-                     size_t len, unsigned int flags)
+long do_splice(struct file *in, loff_t __user *off_in,
+               struct file *out, loff_t __user *off_out,
+               size_t len, unsigned int flags)
 {
        struct pipe_inode_info *ipipe;
        struct pipe_inode_info *opipe;
index 74b4911..ebbbfea 100644 (file)
@@ -78,6 +78,9 @@ extern ssize_t add_to_pipe(struct pipe_inode_info *,
                              struct pipe_buffer *);
 extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
                                      splice_direct_actor *);
+extern long do_splice(struct file *in, loff_t __user *off_in,
+                     struct file *out, loff_t __user *off_out,
+                     size_t len, unsigned int flags);
 
 /*
  * for dynamic pipe sizing