[PATCH 3/5] UBUNTU: Export do_splice_from(), do_splice_to()

Julian Andres Klode juliank at ubuntu.com
Tue Jan 29 20:49:08 UTC 2008


If you use 'loopback mount' on a fs-image file, or use splice(2)
systemcall in aufs, then you need to apply this patch
---
 fs/splice.c            |   12 +++++++-----
 include/linux/splice.h |    6 ++++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/splice.c b/fs/splice.c
index 8683446..18263de 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -893,8 +893,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
 /*
  * Attempt to initiate a splice from pipe to file.
  */
-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
-			   loff_t *ppos, size_t len, unsigned int flags)
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+		    loff_t *ppos, size_t len, unsigned int flags)
 {
 	int ret;
 
@@ -914,13 +914,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
 
 	return out->f_op->splice_write(pipe, out, ppos, len, flags);
 }
+EXPORT_SYMBOL(do_splice_from);
 
 /*
  * Attempt to initiate a splice from a file to a pipe.
  */
-static long do_splice_to(struct file *in, loff_t *ppos,
-			 struct pipe_inode_info *pipe, size_t len,
-			 unsigned int flags)
+long do_splice_to(struct file *in, loff_t *ppos,
+		  struct pipe_inode_info *pipe, size_t len,
+		  unsigned int flags)
 {
 	int ret;
 
@@ -940,6 +941,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
 
 	return in->f_op->splice_read(in, ppos, pipe, len, flags);
 }
+EXPORT_SYMBOL(do_splice_to);
 
 /**
  * splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 33e447f..80e52b2 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -70,4 +70,10 @@ extern ssize_t splice_to_pipe(struct pipe_inode_info *,
 extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
 				      splice_direct_actor *);
 
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+			   loff_t *ppos, size_t len, unsigned int flags);
+extern long do_splice_to(struct file *in, loff_t *ppos,
+			 struct pipe_inode_info *pipe, size_t len,
+			 unsigned int flags);
+
 #endif
-- 
1.5.2.5





More information about the kernel-team mailing list