ITER_PIPE: fold data_start() and pipe_space_for_user() together
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 15 Jun 2022 13:44:38 +0000 (09:44 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 19 Jul 2022 17:08:46 +0000 (13:08 -0400)
commit52830eac8f1854c5a3f6ea114fb960d5001892db
treea89b7cb1135ccf040ab8fdd50d9e1f4051315568
parent7973cc4c7dd55219ca739fb8524152233c8ad7d3
ITER_PIPE: fold data_start() and pipe_space_for_user() together

All their callers are next to each other; all of them
want the total amount of pages and, possibly, the
offset in the partial final buffer.

Combine into a new helper (pipe_npages()), fix the
bogosity in pipe_space_for_user(), while we are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/pipe_fs_i.h
lib/iov_iter.c