]> git.baikalelectronics.ru Git - kernel.git/commit
unify pipe_get_pages() and pipe_get_pages_alloc()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 17 Jun 2022 17:35:35 +0000 (13:35 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 9 Aug 2022 02:37:20 +0000 (22:37 -0400)
commitacbdeb8320b0a470bef1b6c0105d8c2bbc4c4ba0
tree71d93eebaecb1fa4e5fb453b821dec3d1f83f90c
parentc81ce28df500b04444ef97dc82a7b0299ce717e8
unify pipe_get_pages() and pipe_get_pages_alloc()

The differences between those two are
* pipe_get_pages() gets a non-NULL struct page ** value pointing to
preallocated array + array size.
* pipe_get_pages_alloc() gets an address of struct page ** variable that
contains NULL, allocates the array and (on success) stores its address in
that variable.

Not hard to combine - always pass struct page ***, have
the previous pipe_get_pages_alloc() caller pass ~0U as cap for
array size.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c