X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Frelay.c;h=a615a8f513fc890eaa1a11a34ae5e08c78895bba;hb=1f564ad6d4182859612cbae452122e5eb2d62a76;hp=3b299fb3855cc5384fb520beb18b6f6a904da511;hpb=0f166396e7e8931bb4acfd1a6ea1bd4f0b43f1dd;p=linux-2.6-omap-h63xx.git diff --git a/kernel/relay.c b/kernel/relay.c index 3b299fb3855..a615a8f513f 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;