Home
last modified time | relevance | path

Searched hist:"1 b4fb5ff" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/lib/
H A Diov_iter.c1b4fb5ff Mon Apr 26 19:33:42 CDT 2021 Al Viro <viro@zeniv.linux.org.uk> iov_iter: teach iterate_{bvec,xarray}() about possible short copies

... and now we finally can sort out the mess in _copy_mc_to_iter().
Provide a variant of iterate_and_advance() that does *NOT* ignore
the return values of bvec, xarray and kvec callbacks, use that in
_copy_mc_to_iter(). That gets rid of magic in those callbacks -
we used to need it so we'd get at least the right return value in
case of failure halfway through.

As a bonus, now iterator is advanced by the amount actually copied
for all flavours. That's what the callers expect and it used to do that
correctly in iovec and xarray cases. However, in kvec and bvec cases
the iterator had not been advanced on such failures, breaking the users.
Fixed now...

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