diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-17 14:30:39 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-08 22:37:21 -0400 |
commit | 8520008417c581c4c22e39597f92b9814ae34c31 (patch) | |
tree | 0cf8a8577b8291dbd6c97889ddd7f6954d1ca658 /lib/mpi | |
parent | 0aa4fc32f54028f6fbb35bf71df4b0d86ff1662b (diff) | |
download | linux-stable-8520008417c581c4c22e39597f92b9814ae34c31.tar.gz linux-stable-8520008417c581c4c22e39597f92b9814ae34c31.tar.bz2 linux-stable-8520008417c581c4c22e39597f92b9814ae34c31.zip |
fold __pipe_get_pages() into pipe_get_pages()
... and don't mangle maxsize there - turn the loop into counting
one instead. Easier to see that we won't run out of array that
way. Note that special treatment of the partial buffer in that
thing is an artifact of the non-advancing semantics of
iov_iter_get_pages() - if not for that, it would be append_pipe(),
same as the body of the loop that follows it. IOW, once we make
iov_iter_get_pages() advancing, the whole thing will turn into
calculate how many pages do we want
allocate an array (if needed)
call append_pipe() that many times.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/mpi')
0 files changed, 0 insertions, 0 deletions