diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-13 10:51:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-13 10:51:07 -0700 |
commit | 12a22960549979c10a95cc97f8ec63b461c55692 (patch) | |
tree | 87b4130e0ae0f2a548087a3934bb7dba37ed6e87 /kernel | |
parent | 31c4ab430a448cfb13fc88779d8a870c7af9f72b (diff) | |
parent | 51a92c0f6ce8fa85fa0e18ecda1d847e606e8066 (diff) | |
download | kernel_samsung_smdk4412-12a22960549979c10a95cc97f8ec63b461c55692.zip kernel_samsung_smdk4412-12a22960549979c10a95cc97f8ec63b461c55692.tar.gz kernel_samsung_smdk4412-12a22960549979c10a95cc97f8ec63b461c55692.tar.bz2 |
Merge branch 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block
* 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block:
splice: fix offset mangling with direct splicing (sendfile)
security: revalidate rw permissions for sys_splice and sys_vmsplice
relay: fixup kerneldoc comment
relay: fix bogus cast in subbuf_splice_actor()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/relay.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/relay.c b/kernel/relay.c index 3b299fb..a615a8f 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -1061,7 +1061,7 @@ static struct pipe_buf_operations relay_pipe_buf_ops = { .get = generic_pipe_buf_get, }; -/** +/* * subbuf_splice_actor - splice up to one subbuf's worth of data */ static int subbuf_splice_actor(struct file *in, @@ -1074,7 +1074,9 @@ static int subbuf_splice_actor(struct file *in, unsigned int pidx, poff, total_len, subbuf_pages, ret; struct rchan_buf *rbuf = in->private_data; unsigned int subbuf_size = rbuf->chan->subbuf_size; - size_t read_start = ((size_t)*ppos) % rbuf->chan->alloc_size; + uint64_t pos = (uint64_t) *ppos; + uint32_t alloc_size = (uint32_t) rbuf->chan->alloc_size; + size_t read_start = (size_t) do_div(pos, alloc_size); size_t read_subbuf = read_start / subbuf_size; size_t padding = rbuf->padding[read_subbuf]; size_t nonpad_end = read_subbuf * subbuf_size + subbuf_size - padding; |