aboutsummaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-06-14 07:10:48 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-07-10 02:04:15 -0400
commitcac36bb06efe4880234524e117e0e712b10b1f16 (patch)
tree5220c6f2185cee1c6934cf8048975beac5bc94bb /fs/splice.c
parentd96e6e71647846e0dab097efd9b8bf3a3a556dca (diff)
pipe: change the ->pin() operation to ->confirm()
The name 'pin' was badly chosen, it doesn't pin a pipe buffer in the most commonly used sense in the kernel. So change the name to 'confirm', after debating this issue with Hugh Dickins a bit. A good return from ->confirm() means that the buffer is really there, and that the contents are good. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/splice.c b/fs/splice.c
index d257d666358b..c804121601b0 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -85,8 +85,8 @@ static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe,
85 buf->flags &= ~PIPE_BUF_FLAG_LRU; 85 buf->flags &= ~PIPE_BUF_FLAG_LRU;
86} 86}
87 87
88static int page_cache_pipe_buf_pin(struct pipe_inode_info *pipe, 88static int page_cache_pipe_buf_confirm(struct pipe_inode_info *pipe,
89 struct pipe_buffer *buf) 89 struct pipe_buffer *buf)
90{ 90{
91 struct page *page = buf->page; 91 struct page *page = buf->page;
92 int err; 92 int err;
@@ -127,7 +127,7 @@ static const struct pipe_buf_operations page_cache_pipe_buf_ops = {
127 .can_merge = 0, 127 .can_merge = 0,
128 .map = generic_pipe_buf_map, 128 .map = generic_pipe_buf_map,
129 .unmap = generic_pipe_buf_unmap, 129 .unmap = generic_pipe_buf_unmap,
130 .pin = page_cache_pipe_buf_pin, 130 .confirm = page_cache_pipe_buf_confirm,
131 .release = page_cache_pipe_buf_release, 131 .release = page_cache_pipe_buf_release,
132 .steal = page_cache_pipe_buf_steal, 132 .steal = page_cache_pipe_buf_steal,
133 .get = generic_pipe_buf_get, 133 .get = generic_pipe_buf_get,
@@ -147,7 +147,7 @@ static const struct pipe_buf_operations user_page_pipe_buf_ops = {
147 .can_merge = 0, 147 .can_merge = 0,
148 .map = generic_pipe_buf_map, 148 .map = generic_pipe_buf_map,
149 .unmap = generic_pipe_buf_unmap, 149 .unmap = generic_pipe_buf_unmap,
150 .pin = generic_pipe_buf_pin, 150 .confirm = generic_pipe_buf_confirm,
151 .release = page_cache_pipe_buf_release, 151 .release = page_cache_pipe_buf_release,
152 .steal = user_page_pipe_buf_steal, 152 .steal = user_page_pipe_buf_steal,
153 .get = generic_pipe_buf_get, 153 .get = generic_pipe_buf_get,
@@ -525,7 +525,7 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
525 loff_t pos = sd->pos; 525 loff_t pos = sd->pos;
526 int ret, more; 526 int ret, more;
527 527
528 ret = buf->ops->pin(pipe, buf); 528 ret = buf->ops->confirm(pipe, buf);
529 if (!ret) { 529 if (!ret) {
530 more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len; 530 more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
531 531
@@ -569,7 +569,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
569 /* 569 /*
570 * make sure the data in this buffer is uptodate 570 * make sure the data in this buffer is uptodate
571 */ 571 */
572 ret = buf->ops->pin(pipe, buf); 572 ret = buf->ops->confirm(pipe, buf);
573 if (unlikely(ret)) 573 if (unlikely(ret))
574 return ret; 574 return ret;
575 575
@@ -1341,7 +1341,7 @@ static int pipe_to_user(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
1341 char *src; 1341 char *src;
1342 int ret; 1342 int ret;
1343 1343
1344 ret = buf->ops->pin(pipe, buf); 1344 ret = buf->ops->confirm(pipe, buf);
1345 if (unlikely(ret)) 1345 if (unlikely(ret))
1346 return ret; 1346 return ret;
1347 1347