mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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>
This commit is contained in:
parent
532f57da40
commit
7591489a8f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue