Commit 497f9625 authored by Jens Axboe's avatar Jens Axboe

pipe: allow passing around of ops private pointer

relay needs this for proper consumption handling, and the network
receive support needs it as well to lookup the sk_buff on pipe
release.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent d6b29d7c
...@@ -185,6 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, ...@@ -185,6 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
buf->page = spd->pages[page_nr]; buf->page = spd->pages[page_nr];
buf->offset = spd->partial[page_nr].offset; buf->offset = spd->partial[page_nr].offset;
buf->len = spd->partial[page_nr].len; buf->len = spd->partial[page_nr].len;
buf->private = spd->partial[page_nr].private;
buf->ops = spd->ops; buf->ops = spd->ops;
if (spd->flags & SPLICE_F_GIFT) if (spd->flags & SPLICE_F_GIFT)
buf->flags |= PIPE_BUF_FLAG_GIFT; buf->flags |= PIPE_BUF_FLAG_GIFT;
......
...@@ -14,6 +14,7 @@ struct pipe_buffer { ...@@ -14,6 +14,7 @@ struct pipe_buffer {
unsigned int offset, len; unsigned int offset, len;
const struct pipe_buf_operations *ops; const struct pipe_buf_operations *ops;
unsigned int flags; unsigned int flags;
unsigned long private;
}; };
struct pipe_inode_info { struct pipe_inode_info {
......
...@@ -41,6 +41,7 @@ struct splice_desc { ...@@ -41,6 +41,7 @@ struct splice_desc {
struct partial_page { struct partial_page {
unsigned int offset; unsigned int offset;
unsigned int len; unsigned int len;
unsigned long private;
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment