aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-26 11:27:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-26 11:27:24 -0700
commit729eb528c7e10a4828fece102872ec5255946f64 (patch)
tree7b47b66949b4f93eb2bf1f00c8adfec7f0d4d719 /kernel
parentc8237a5fcea9d49a73275b4c8f541dd42f8da1a4 (diff)
parent5eb7f9fa847b8ab6e4864bfb8cb45f370844a47c (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: relay: set an spd_release() hook for splice set relay file can not be read by pread(2)
Diffstat (limited to 'kernel')
-rw-r--r--kernel/relay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/relay.c b/kernel/relay.c
index 4c035a8a248..d6204a48581 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
kref_get(&buf->kref);
filp->private_data = buf;
- return 0;
+ return nonseekable_open(inode, filp);
}
/**
@@ -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)