aboutsummaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2006-12-13 03:34:04 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:47 -0500
commitd4c3cca941b64a938eaa9734585a93547c6be323 (patch)
tree48b78bda9d4da9c3bdfb30548cb65f0bc4015733 /fs/splice.c
parent426d62e2158c2fd3aa1ed1fd62122afd2ccb89ae (diff)
[PATCH] constify pipe_buf_operations
- pipe/splice should use const pipe_buf_operations and file_operations - struct pipe_inode_info has an unused field "start" : get rid of it. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/splice.c b/fs/splice.c
index bbd0aeb3f68e..2fca6ebf4cc2 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -42,7 +42,7 @@ struct splice_pipe_desc {
42 struct partial_page *partial; /* pages[] may not be contig */ 42 struct partial_page *partial; /* pages[] may not be contig */
43 int nr_pages; /* number of pages in map */ 43 int nr_pages; /* number of pages in map */
44 unsigned int flags; /* splice flags */ 44 unsigned int flags; /* splice flags */
45 struct pipe_buf_operations *ops;/* ops associated with output pipe */ 45 const struct pipe_buf_operations *ops;/* ops associated with output pipe */
46}; 46};
47 47
48/* 48/*
@@ -139,7 +139,7 @@ error:
139 return err; 139 return err;
140} 140}
141 141
142static struct pipe_buf_operations page_cache_pipe_buf_ops = { 142static const struct pipe_buf_operations page_cache_pipe_buf_ops = {
143 .can_merge = 0, 143 .can_merge = 0,
144 .map = generic_pipe_buf_map, 144 .map = generic_pipe_buf_map,
145 .unmap = generic_pipe_buf_unmap, 145 .unmap = generic_pipe_buf_unmap,
@@ -159,7 +159,7 @@ static int user_page_pipe_buf_steal(struct pipe_inode_info *pipe,
159 return generic_pipe_buf_steal(pipe, buf); 159 return generic_pipe_buf_steal(pipe, buf);
160} 160}
161 161
162static struct pipe_buf_operations user_page_pipe_buf_ops = { 162static const struct pipe_buf_operations user_page_pipe_buf_ops = {
163 .can_merge = 0, 163 .can_merge = 0,
164 .map = generic_pipe_buf_map, 164 .map = generic_pipe_buf_map,
165 .unmap = generic_pipe_buf_unmap, 165 .unmap = generic_pipe_buf_unmap,
@@ -724,7 +724,7 @@ static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe,
724 for (;;) { 724 for (;;) {
725 if (pipe->nrbufs) { 725 if (pipe->nrbufs) {
726 struct pipe_buffer *buf = pipe->bufs + pipe->curbuf; 726 struct pipe_buffer *buf = pipe->bufs + pipe->curbuf;
727 struct pipe_buf_operations *ops = buf->ops; 727 const struct pipe_buf_operations *ops = buf->ops;
728 728
729 sd.len = buf->len; 729 sd.len = buf->len;
730 if (sd.len > sd.total_len) 730 if (sd.len > sd.total_len)