提交 76ad4d11 编写于 作者: J Jens Axboe 提交者: Jens Axboe

[PATCH] splice: rename remaining info variables to pipe

Same thing was done in fs/pipe.c and most of fs/splice.c, but we had
a few missing still.
Signed-off-by: NJens Axboe <axboe@suse.de>
上级 1432873a
...@@ -51,7 +51,7 @@ struct splice_pipe_desc { ...@@ -51,7 +51,7 @@ struct splice_pipe_desc {
* addition of remove_mapping(). If success is returned, the caller may * addition of remove_mapping(). If success is returned, the caller may
* attempt to reuse this page for another destination. * attempt to reuse this page for another destination.
*/ */
static int page_cache_pipe_buf_steal(struct pipe_inode_info *info, static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf) struct pipe_buffer *buf)
{ {
struct page *page = buf->page; struct page *page = buf->page;
...@@ -82,14 +82,14 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *info, ...@@ -82,14 +82,14 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *info,
return 0; return 0;
} }
static void page_cache_pipe_buf_release(struct pipe_inode_info *info, static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe,
struct pipe_buffer *buf) struct pipe_buffer *buf)
{ {
page_cache_release(buf->page); page_cache_release(buf->page);
buf->flags &= ~PIPE_BUF_FLAG_LRU; buf->flags &= ~PIPE_BUF_FLAG_LRU;
} }
static int page_cache_pipe_buf_pin(struct pipe_inode_info *info, static int page_cache_pipe_buf_pin(struct pipe_inode_info *pipe,
struct pipe_buffer *buf) struct pipe_buffer *buf)
{ {
struct page *page = buf->page; struct page *page = buf->page;
...@@ -500,14 +500,14 @@ EXPORT_SYMBOL(generic_file_splice_read); ...@@ -500,14 +500,14 @@ EXPORT_SYMBOL(generic_file_splice_read);
* Send 'sd->len' bytes to socket from 'sd->file' at position 'sd->pos' * Send 'sd->len' bytes to socket from 'sd->file' at position 'sd->pos'
* using sendpage(). Return the number of bytes sent. * using sendpage(). Return the number of bytes sent.
*/ */
static int pipe_to_sendpage(struct pipe_inode_info *info, static int pipe_to_sendpage(struct pipe_inode_info *pipe,
struct pipe_buffer *buf, struct splice_desc *sd) struct pipe_buffer *buf, struct splice_desc *sd)
{ {
struct file *file = sd->file; struct file *file = sd->file;
loff_t pos = sd->pos; loff_t pos = sd->pos;
int ret, more; int ret, more;
ret = buf->ops->pin(info, buf); ret = buf->ops->pin(pipe, buf);
if (!ret) { if (!ret) {
more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len; more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
...@@ -538,7 +538,7 @@ static int pipe_to_sendpage(struct pipe_inode_info *info, ...@@ -538,7 +538,7 @@ static int pipe_to_sendpage(struct pipe_inode_info *info,
* SPLICE_F_MOVE isn't set, or we cannot move the page, we simply create * SPLICE_F_MOVE isn't set, or we cannot move the page, we simply create
* a new page in the output file page cache and fill/dirty that. * a new page in the output file page cache and fill/dirty that.
*/ */
static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf, static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
struct splice_desc *sd) struct splice_desc *sd)
{ {
struct file *file = sd->file; struct file *file = sd->file;
...@@ -552,7 +552,7 @@ static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf, ...@@ -552,7 +552,7 @@ static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf,
/* /*
* make sure the data in this buffer is uptodate * make sure the data in this buffer is uptodate
*/ */
ret = buf->ops->pin(info, buf); ret = buf->ops->pin(pipe, buf);
if (unlikely(ret)) if (unlikely(ret))
return ret; return ret;
...@@ -573,7 +573,7 @@ static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf, ...@@ -573,7 +573,7 @@ static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf,
* pagecache and we can reuse it. The page will also be * pagecache and we can reuse it. The page will also be
* locked on successful return. * locked on successful return.
*/ */
if (buf->ops->steal(info, buf)) if (buf->ops->steal(pipe, buf))
goto find_page; goto find_page;
page = buf->page; page = buf->page;
...@@ -659,13 +659,13 @@ static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf, ...@@ -659,13 +659,13 @@ static int pipe_to_file(struct pipe_inode_info *info, struct pipe_buffer *buf,
/* /*
* Careful, ->map() uses KM_USER0! * Careful, ->map() uses KM_USER0!
*/ */
char *src = buf->ops->map(info, buf, 1); char *src = buf->ops->map(pipe, buf, 1);
char *dst = kmap_atomic(page, KM_USER1); char *dst = kmap_atomic(page, KM_USER1);
memcpy(dst + offset, src + buf->offset, this_len); memcpy(dst + offset, src + buf->offset, this_len);
flush_dcache_page(page); flush_dcache_page(page);
kunmap_atomic(dst, KM_USER1); kunmap_atomic(dst, KM_USER1);
buf->ops->unmap(info, buf, src); buf->ops->unmap(pipe, buf, src);
} }
ret = mapping->a_ops->commit_write(file, page, offset, offset+this_len); ret = mapping->a_ops->commit_write(file, page, offset, offset+this_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册