aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-05-02 12:57:18 +0200
committerJens Axboe <axboe@suse.de>2006-05-02 12:57:18 +0200
commit7591489a8fbee83f19bacc75756989a6a4d0389c (patch)
treeec185e3788e3c3f123ff3ee00b18441467eb4486 /fs
parent532f57da408c5a5710075d17047e2d97bdfd22f3 (diff)
[PATCH] vmsplice: fix badly placed end paranthesis
We need to use the minium of {len, PAGE_SIZE-off}, not {len, PAGE_SIZE}-off. The latter doesn't make any sense, and could cause us to attempt negative length transfers... Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/splice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c
index b150493b6fc..b0c157d7694 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1143,7 +1143,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
* Fill this contiguous range into the partial page map.
*/
for (i = 0; i < error; i++) {
- const int plen = min_t(size_t, len, PAGE_SIZE) - off;
+ const int plen = min_t(size_t, len, PAGE_SIZE - off);
partial[buffers].offset = off;
partial[buffers].len = plen;