Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58535
b: refs/heads/master
c: cac36bb
h: refs/heads/master
i:
  58533: 5640d2e
  58531: e7259e2
  58527: 73baccc
v: v3
  • Loading branch information
Jens Axboe committed Jul 10, 2007
1 parent 73ccc4b commit 6524938
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d96e6e71647846e0dab097efd9b8bf3a3a556dca
refs/heads/master: cac36bb06efe4880234524e117e0e712b10b1f16
2 changes: 1 addition & 1 deletion trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ lo_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
size_t size;
int ret;

ret = buf->ops->pin(pipe, buf);
ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
size_t size;
int ret;

ret = buf->ops->pin(pipe, buf);
ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ static int ocfs2_splice_write_actor(struct pipe_inode_info *pipe,
ssize_t copied = 0;
struct ocfs2_splice_write_priv sp;

ret = buf->ops->pin(pipe, buf);
ret = buf->ops->confirm(pipe, buf);
if (ret)
goto out;

Expand All @@ -1604,7 +1604,7 @@ static int ocfs2_splice_write_actor(struct pipe_inode_info *pipe,
* might enter ocfs2_buffered_write_cluster() more
* than once, so keep track of our progress here.
*/
copied = ocfs2_buffered_write_cluster(sd->file,
copied = ocfs2_buffered_write_cluster(sd->u.file,
(loff_t)sd->pos + total,
count,
ocfs2_map_and_write_splice_data,
Expand Down
9 changes: 5 additions & 4 deletions trunk/fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ void generic_pipe_buf_get(struct pipe_inode_info *info, struct pipe_buffer *buf)
page_cache_get(buf->page);
}

int generic_pipe_buf_pin(struct pipe_inode_info *info, struct pipe_buffer *buf)
int generic_pipe_buf_confirm(struct pipe_inode_info *info,
struct pipe_buffer *buf)
{
return 0;
}
Expand All @@ -212,7 +213,7 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = {
.can_merge = 1,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
.pin = generic_pipe_buf_pin,
.confirm = generic_pipe_buf_confirm,
.release = anon_pipe_buf_release,
.steal = generic_pipe_buf_steal,
.get = generic_pipe_buf_get,
Expand Down Expand Up @@ -252,7 +253,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
if (chars > total_len)
chars = total_len;

error = ops->pin(pipe, buf);
error = ops->confirm(pipe, buf);
if (error) {
if (!ret)
error = ret;
Expand Down Expand Up @@ -373,7 +374,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
int error, atomic = 1;
void *addr;

error = ops->pin(pipe, buf);
error = ops->confirm(pipe, buf);
if (error)
goto out;

Expand Down
14 changes: 7 additions & 7 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe,
buf->flags &= ~PIPE_BUF_FLAG_LRU;
}

static int page_cache_pipe_buf_pin(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
static int page_cache_pipe_buf_confirm(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
struct page *page = buf->page;
int err;
Expand Down Expand Up @@ -127,7 +127,7 @@ static const struct pipe_buf_operations page_cache_pipe_buf_ops = {
.can_merge = 0,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
.pin = page_cache_pipe_buf_pin,
.confirm = page_cache_pipe_buf_confirm,
.release = page_cache_pipe_buf_release,
.steal = page_cache_pipe_buf_steal,
.get = generic_pipe_buf_get,
Expand All @@ -147,7 +147,7 @@ static const struct pipe_buf_operations user_page_pipe_buf_ops = {
.can_merge = 0,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
.pin = generic_pipe_buf_pin,
.confirm = generic_pipe_buf_confirm,
.release = page_cache_pipe_buf_release,
.steal = user_page_pipe_buf_steal,
.get = generic_pipe_buf_get,
Expand Down Expand Up @@ -525,7 +525,7 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
loff_t pos = sd->pos;
int ret, more;

ret = buf->ops->pin(pipe, buf);
ret = buf->ops->confirm(pipe, buf);
if (!ret) {
more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;

Expand Down Expand Up @@ -569,7 +569,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
/*
* make sure the data in this buffer is uptodate
*/
ret = buf->ops->pin(pipe, buf);
ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

Expand Down Expand Up @@ -1341,7 +1341,7 @@ static int pipe_to_user(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
char *src;
int ret;

ret = buf->ops->pin(pipe, buf);
ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

Expand Down
9 changes: 5 additions & 4 deletions trunk/include/linux/pipe_fs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,21 @@ struct pipe_inode_info {
/*
* Note on the nesting of these functions:
*
* ->pin()
* ->confirm()
* ->steal()
* ...
* ->map()
* ...
* ->unmap()
*
* That is, ->map() must be called on a pinned buffer, same goes for ->steal().
* That is, ->map() must be called on a confirmed buffer,
* same goes for ->steal().
*/
struct pipe_buf_operations {
int can_merge;
void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int);
void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *);
int (*pin)(struct pipe_inode_info *, struct pipe_buffer *);
int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *);
void (*release)(struct pipe_inode_info *, struct pipe_buffer *);
int (*steal)(struct pipe_inode_info *, struct pipe_buffer *);
void (*get)(struct pipe_inode_info *, struct pipe_buffer *);
Expand All @@ -69,7 +70,7 @@ void __free_pipe_info(struct pipe_inode_info *);
void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *);
void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *);
int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *);

#endif
2 changes: 1 addition & 1 deletion trunk/kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ static struct pipe_buf_operations relay_pipe_buf_ops = {
.can_merge = 0,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
.pin = generic_pipe_buf_pin,
.confirm = generic_pipe_buf_confirm,
.release = relay_pipe_buf_release,
.steal = generic_pipe_buf_steal,
.get = generic_pipe_buf_get,
Expand Down

0 comments on commit 6524938

Please sign in to comment.