iov_iter_gap_alignment(): get rid of iterate_all_kinds()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 25 Apr 2021 05:03:16 +0000 (01:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Jun 2021 15:45:11 +0000 (11:45 -0400)
commit610c7a71543df32fcecf64004f974905f5881fb3
tree7811b3b50723fe322b5c60c79fb3d8d38e5edd0b
parent9221d2e37b729077797e6d02012289892dbdb859
iov_iter_gap_alignment(): get rid of iterate_all_kinds()

For one thing, it's only used for iovec (and makes sense only for those).
For another, here we don't care about iov_offset, since the beginning of
the first segment and the end of the last one are ignored.  So it makes
a lot more sense to just walk through the iovec array...

We need to deal with the case of truncated iov_iter, but unlike the
situation with iov_iter_alignment() we don't care where the last
segment ends - just which segment is the last one.

[fixed a braino spotted by Qian Cai <quic_qiancai@quicinc.com>]

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