From: Jens Axboe Date: Wed, 26 Mar 2008 11:04:09 +0000 (+0100) Subject: relay: set an spd_release() hook for splice X-Git-Tag: v2.6.25-rc8~85^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5eb7f9fa847b8ab6e4864bfb8cb45f370844a47c;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/kernel/relay.c b/kernel/relay.c index ed3f6cf2db8..d6204a48581 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -1056,6 +1056,10 @@ static struct pipe_buf_operations relay_pipe_buf_ops = { .get = generic_pipe_buf_get, }; +static void relay_page_release(struct splice_pipe_desc *spd, unsigned int i) +{ +} + /* * subbuf_splice_actor - splice up to one subbuf's worth of data */ @@ -1083,6 +1087,7 @@ static int subbuf_splice_actor(struct file *in, .partial = partial, .flags = flags, .ops = &relay_pipe_buf_ops, + .spd_release = relay_page_release, }; if (rbuf->subbufs_produced == rbuf->subbufs_consumed)