diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-18 10:43:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-18 10:43:14 -0400 |
commit | 92f53c6f1e47d92b40b1e9e1662b0056c783b962 (patch) | |
tree | 850cba7afebec402f8db3fa6e9ea5199e858ffd7 /kernel/relay.c | |
parent | ff69c00f0a58383f1f60dd2756e54a857f08d249 (diff) | |
parent | 40044ce0bf2b7e548584d91f108444e83ed5eab3 (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:
Revert "unexport bio_{,un}map_user"
relay: fix subbuf_splice_actor() adding too many pages
The ps2esdi driver was marked as BROKEN more than two years ago due to being
Diffstat (limited to 'kernel/relay.c')
-rw-r--r-- | kernel/relay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/relay.c b/kernel/relay.c index d080b9d161a7..4c035a8a248c 100644 --- a/kernel/relay.c +++ b/kernel/relay.c | |||
@@ -1066,7 +1066,7 @@ static int subbuf_splice_actor(struct file *in, | |||
1066 | unsigned int flags, | 1066 | unsigned int flags, |
1067 | int *nonpad_ret) | 1067 | int *nonpad_ret) |
1068 | { | 1068 | { |
1069 | unsigned int pidx, poff, total_len, subbuf_pages, ret; | 1069 | unsigned int pidx, poff, total_len, subbuf_pages, nr_pages, ret; |
1070 | struct rchan_buf *rbuf = in->private_data; | 1070 | struct rchan_buf *rbuf = in->private_data; |
1071 | unsigned int subbuf_size = rbuf->chan->subbuf_size; | 1071 | unsigned int subbuf_size = rbuf->chan->subbuf_size; |
1072 | uint64_t pos = (uint64_t) *ppos; | 1072 | uint64_t pos = (uint64_t) *ppos; |
@@ -1097,8 +1097,9 @@ static int subbuf_splice_actor(struct file *in, | |||
1097 | subbuf_pages = rbuf->chan->alloc_size >> PAGE_SHIFT; | 1097 | subbuf_pages = rbuf->chan->alloc_size >> PAGE_SHIFT; |
1098 | pidx = (read_start / PAGE_SIZE) % subbuf_pages; | 1098 | pidx = (read_start / PAGE_SIZE) % subbuf_pages; |
1099 | poff = read_start & ~PAGE_MASK; | 1099 | poff = read_start & ~PAGE_MASK; |
1100 | nr_pages = min_t(unsigned int, subbuf_pages, PIPE_BUFFERS); | ||
1100 | 1101 | ||
1101 | for (total_len = 0; spd.nr_pages < subbuf_pages; spd.nr_pages++) { | 1102 | for (total_len = 0; spd.nr_pages < nr_pages; spd.nr_pages++) { |
1102 | unsigned int this_len, this_end, private; | 1103 | unsigned int this_len, this_end, private; |
1103 | unsigned int cur_pos = read_start + total_len; | 1104 | unsigned int cur_pos = read_start + total_len; |
1104 | 1105 | ||