io_uring/rsrc: Drop io_copy_iov in favor of iovec API
authorGabriel Krisman Bertazi <krisman@suse.de>
Thu, 23 May 2024 21:45:35 +0000 (17:45 -0400)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 May 2024 16:44:13 +0000 (10:44 -0600)
commita903dda35f7d61689d45581744e697f146537e75
treea9f949e1dd2b6d1a4bccfd47faae300721bd7169
parent631e0ef0d1ca3c046f5879ddcd6c7c68071f2863
io_uring/rsrc: Drop io_copy_iov in favor of iovec API

Instead of open coding an io_uring function to copy iovs from userspace,
rely on the existing iovec_from_user function.  While there, avoid
repeatedly zeroing the iov in the !arg case for io_sqe_buffer_register.

tested with liburing testsuite.

Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20240523214535.31890-1-krisman@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c