diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 8 |
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 | ||
142 | static struct pipe_buf_operations page_cache_pipe_buf_ops = { | 142 | static 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 | ||
162 | static struct pipe_buf_operations user_page_pipe_buf_ops = { | 162 | static 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) |