get rid of iterate_all_kinds() in iov_iter_get_pages()/iov_iter_get_pages_alloc()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 25 Apr 2021 13:14:44 +0000 (09:14 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Jun 2021 15:45:12 +0000 (11:45 -0400)
commit3d671ca62a08114810321a2a5e9d3523de5fb1b4
tree03e5c3d01736827a05559847bffdf7bee018b250
parent610c7a71543df32fcecf64004f974905f5881fb3
get rid of iterate_all_kinds() in iov_iter_get_pages()/iov_iter_get_pages_alloc()

Here iterate_all_kinds() is used just to find the first (non-empty, in
case of iovec) segment.  Which can be easily done explicitly.
Note that in bvec case we now can get more than PAGE_SIZE worth of them,
in case when we have a compound page in bvec and a range that crosses
a subpage boundary.  Older behaviour had been to stop on that boundary;
we used to get the right first page (for_each_bvec() took care of that),
but that was all we'd got.

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