Skip to content

Commit 497f962

Browse files
author
Jens Axboe
committed
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: Jens Axboe <jens.axboe@oracle.com>
1 parent d6b29d7 commit 497f962

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎fs/splice.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
185185
buf->page = spd->pages[page_nr];
186186
buf->offset = spd->partial[page_nr].offset;
187187
buf->len = spd->partial[page_nr].len;
188+
buf->private = spd->partial[page_nr].private;
188189
buf->ops = spd->ops;
189190
if (spd->flags & SPLICE_F_GIFT)
190191
buf->flags |= PIPE_BUF_FLAG_GIFT;

‎include/linux/pipe_fs_i.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct pipe_buffer {
1414
unsigned int offset, len;
1515
const struct pipe_buf_operations *ops;
1616
unsigned int flags;
17+
unsigned long private;
1718
};
1819

1920
struct pipe_inode_info {

‎include/linux/splice.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct splice_desc {
4141
struct partial_page {
4242
unsigned int offset;
4343
unsigned int len;
44+
unsigned long private;
4445
};
4546

4647
/*

0 commit comments

Comments
 (0)