Commit 729eb528 authored by Linus Torvalds's avatar Linus Torvalds

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)
parents c8237a5f 5eb7f9fa
...@@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp) ...@@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
kref_get(&buf->kref); kref_get(&buf->kref);
filp->private_data = buf; filp->private_data = buf;
return 0; return nonseekable_open(inode, filp);
} }
/** /**
...@@ -1056,6 +1056,10 @@ static struct pipe_buf_operations relay_pipe_buf_ops = { ...@@ -1056,6 +1056,10 @@ static struct pipe_buf_operations relay_pipe_buf_ops = {
.get = generic_pipe_buf_get, .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 * subbuf_splice_actor - splice up to one subbuf's worth of data
*/ */
...@@ -1083,6 +1087,7 @@ static int subbuf_splice_actor(struct file *in, ...@@ -1083,6 +1087,7 @@ static int subbuf_splice_actor(struct file *in,
.partial = partial, .partial = partial,
.flags = flags, .flags = flags,
.ops = &relay_pipe_buf_ops, .ops = &relay_pipe_buf_ops,
.spd_release = relay_page_release,
}; };
if (rbuf->subbufs_produced == rbuf->subbufs_consumed) if (rbuf->subbufs_produced == rbuf->subbufs_consumed)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment