Skip to content

Commit

Permalink
splice: export do_tee()
Browse files Browse the repository at this point in the history
export do_tee() for use in io_uring

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed May 17, 2020
1 parent c11368a commit 9dafdfc
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions fs/splice.c
Original file line number Diff line number Diff line change
@@ -1754,8 +1754,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
* The 'flags' used are the SPLICE_F_* variants, currently the only
* applicable one is SPLICE_F_NONBLOCK.
*/
static long do_tee(struct file *in, struct file *out, size_t len,
unsigned int flags)
long do_tee(struct file *in, struct file *out, size_t len, unsigned int flags)
{
struct pipe_inode_info *ipipe = get_pipe_info(in);
struct pipe_inode_info *opipe = get_pipe_info(out);
3 changes: 3 additions & 0 deletions include/linux/splice.h
Original file line number Diff line number Diff line change
@@ -82,6 +82,9 @@ 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);

extern long do_tee(struct file *in, struct file *out, size_t len,
unsigned int flags);

/*
* for dynamic pipe sizing
*/

0 comments on commit 9dafdfc

Please sign in to comment.