From b2ee78de50a26b0ddc8cfd0cf637d0a3649508b9 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 30 Aug 2012 16:13:49 +0200 Subject: [PATCH 02/13] vfs: export do_splice_direct() to modules Patch-mainline: not yet Export do_splice_direct() to modules. Needed by overlay filesystem. Signed-off-by: Miklos Szeredi --- fs/internal.h | 6 ------ fs/splice.c | 1 + include/linux/fs.h | 3 +++ 3 files changed, 4 insertions(+), 6 deletions(-) --- a/fs/splice.c +++ b/fs/splice.c @@ -1312,6 +1312,7 @@ long do_splice_direct(struct file *in, l return ret; } +EXPORT_SYMBOL(do_splice_direct); static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, --- a/fs/internal.h +++ b/fs/internal.h @@ -132,12 +132,6 @@ extern struct dentry *__d_alloc(struct s extern int rw_verify_area(int, struct file *, const loff_t *, size_t); /* - * splice.c - */ -extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, - loff_t *opos, size_t len, unsigned int flags); - -/* * pipe.c */ extern const struct file_operations pipefifo_fops; --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2427,6 +2427,9 @@ extern ssize_t generic_file_splice_write struct file *, loff_t *, size_t, unsigned int); extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, struct file *out, loff_t *, size_t len, unsigned int flags); +extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, + loff_t *opos, size_t len, unsigned int flags); + extern void file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);