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, 19 Jul 2022 17:08:46 +0000 (13:08 -0400)
commitbb97862458076b355c6c1af6ec4ad3f391839111
treeb1b538e06117977f7ddaa3b3f3a8c301ed06e652
parentaf4726711f40d6709655a48ed2499d822938b8f5
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