Skip to content

Commit 5eb7f9f

Browse files
author
Jens Axboe
committed
relay: set an spd_release() hook for splice
relay doesn't reference the pages it adds, however we need a non-NULL hook or splice_to_pipe() can oops. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent 37529fe commit 5eb7f9f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎kernel/relay.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,10 @@ static struct pipe_buf_operations relay_pipe_buf_ops = {
10561056
.get = generic_pipe_buf_get,
10571057
};
10581058

1059+
static void relay_page_release(struct splice_pipe_desc *spd, unsigned int i)
1060+
{
1061+
}
1062+
10591063
/*
10601064
* subbuf_splice_actor - splice up to one subbuf's worth of data
10611065
*/
@@ -1083,6 +1087,7 @@ static int subbuf_splice_actor(struct file *in,
10831087
.partial = partial,
10841088
.flags = flags,
10851089
.ops = &relay_pipe_buf_ops,
1090+
.spd_release = relay_page_release,
10861091
};
10871092

10881093
if (rbuf->subbufs_produced == rbuf->subbufs_consumed)

0 commit comments

Comments
 (0)