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>
Sun, 16 Jun 2024 20:54:55 +0000 (14:54 -0600)
commitf4eaf8eda89e1ae5d8274297094687245293deff
treebbcce9593a693a3ad202e3c6c7d5ec363a890bae
parent81cc927d9c5eefd4a1b08e16b0ab2263f36d03f7
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