aboutsummaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2011-07-25 20:12:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 23:57:11 -0400
commit708e3508c2a2204cc276dcdb543009a441bfe91b (patch)
tree9e301ba4ebf3b34a00228c26977feebfba8ad9ef /fs/splice.c
parent2efaca927f5cd7ecd0f1554b8f9b6a9a2c329c03 (diff)
tmpfs: clone shmem_file_splice_read()
Copy __generic_file_splice_read() and generic_file_splice_read() from fs/splice.c to shmem_file_splice_read() in mm/shmem.c. Make page_cache_pipe_buf_ops and spd_release_page() accessible to it. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/splice.c b/fs/splice.c
index aa866d309695..fa2defa8afcf 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -132,7 +132,7 @@ error:
132 return err; 132 return err;
133} 133}
134 134
135static const struct pipe_buf_operations page_cache_pipe_buf_ops = { 135const struct pipe_buf_operations page_cache_pipe_buf_ops = {
136 .can_merge = 0, 136 .can_merge = 0,
137 .map = generic_pipe_buf_map, 137 .map = generic_pipe_buf_map,
138 .unmap = generic_pipe_buf_unmap, 138 .unmap = generic_pipe_buf_unmap,
@@ -264,7 +264,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
264 return ret; 264 return ret;
265} 265}
266 266
267static void spd_release_page(struct splice_pipe_desc *spd, unsigned int i) 267void spd_release_page(struct splice_pipe_desc *spd, unsigned int i)
268{ 268{
269 page_cache_release(spd->pages[i]); 269 page_cache_release(spd->pages[i]);
270} 270}