iov_iter: teach iov_iter_iovec() to deal with ITER_UBUF
authorJens Axboe <axboe@kernel.dk>
Mon, 27 Mar 2023 19:03:12 +0000 (13:03 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Mar 2023 21:52:58 +0000 (15:52 -0600)
commit4cb1248c7167ecc1aeb15f7144914c12d5a42b8c
tree1c479cc3fd50a3f572ee4f33bafbbd02b8caccb0
parenta684600dcd005be0852e321b7cdd6cf7d42dad55
iov_iter: teach iov_iter_iovec() to deal with ITER_UBUF

Even if we're returning an iovec, we can trivially fill it in with the
details from an ITER_UBUF as well. This enables loops that assume
ITER_IOVEC to deal with ITER_UBUF transparently.

Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/uio.h