mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
io_uring/net: make io_net_vec_assign() return void
io_net_vec_assign() can only return 0 and it doesn't make sense for it to fail, so make it return void. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/7c1a2390c99e17d3ae4e8562063e572d3cdeb164.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
d19af0e936
commit
fefcb0dcd0
1 changed files with 5 additions and 4 deletions
|
@ -168,7 +168,7 @@ static struct io_async_msghdr *io_msg_alloc_async(struct io_kiocb *req)
|
|||
}
|
||||
|
||||
/* assign new iovec to kmsg, if we need to */
|
||||
static int io_net_vec_assign(struct io_kiocb *req, struct io_async_msghdr *kmsg,
|
||||
static void io_net_vec_assign(struct io_kiocb *req, struct io_async_msghdr *kmsg,
|
||||
struct iovec *iov)
|
||||
{
|
||||
if (iov) {
|
||||
|
@ -178,7 +178,6 @@ static int io_net_vec_assign(struct io_kiocb *req, struct io_async_msghdr *kmsg,
|
|||
kfree(kmsg->free_iov);
|
||||
kmsg->free_iov = iov;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void io_mshot_prep_retry(struct io_kiocb *req,
|
||||
|
@ -240,7 +239,8 @@ static int io_compat_msg_copy_hdr(struct io_kiocb *req,
|
|||
if (unlikely(ret < 0))
|
||||
return ret;
|
||||
|
||||
return io_net_vec_assign(req, iomsg, iov);
|
||||
io_net_vec_assign(req, iomsg, iov);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -299,7 +299,8 @@ ua_end:
|
|||
if (unlikely(ret < 0))
|
||||
return ret;
|
||||
|
||||
return io_net_vec_assign(req, iomsg, iov);
|
||||
io_net_vec_assign(req, iomsg, iov);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int io_sendmsg_copy_hdr(struct io_kiocb *req,
|
||||
|
|
Loading…
Add table
Reference in a new issue