aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-03-26 07:04:09 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-03-26 07:04:09 -0400
commit5eb7f9fa847b8ab6e4864bfb8cb45f370844a47c (patch)
tree6d84d9441eaf31bf471fb98996bb6e5b5ecd875f /kernel
parent37529fe9f62835e1c11895a1895064748b032dc1 (diff)
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/relay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/relay.c b/kernel/relay.c
index ed3f6cf2db86..d6204a485818 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -1056,6 +1056,10 @@ static struct pipe_buf_operations relay_pipe_buf_ops = {
1056 .get = generic_pipe_buf_get, 1056 .get = generic_pipe_buf_get,
1057}; 1057};
1058 1058
1059static void relay_page_release(struct splice_pipe_desc *spd, unsigned int i)
1060{
1061}
1062
1059/* 1063/*
1060 * subbuf_splice_actor - splice up to one subbuf's worth of data 1064 * subbuf_splice_actor - splice up to one subbuf's worth of data
1061 */ 1065 */
@@ -1083,6 +1087,7 @@ static int subbuf_splice_actor(struct file *in,
1083 .partial = partial, 1087 .partial = partial,
1084 .flags = flags, 1088 .flags = flags,
1085 .ops = &relay_pipe_buf_ops, 1089 .ops = &relay_pipe_buf_ops,
1090 .spd_release = relay_page_release,
1086 }; 1091 };
1087 1092
1088 if (rbuf->subbufs_produced == rbuf->subbufs_consumed) 1093 if (rbuf->subbufs_produced == rbuf->subbufs_consumed)