mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
io_uring: simplify iovec freeing in io_clean_op()
We don't get REQ_F_NEED_CLEANUP for rw unless there is ->free_iovec set, so remove the optimisation of NULL checking it inline, kfree() will take care if that would ever be the case. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a233dc655d3d45bd4f69b73d55a61de46d914415.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
b8e64b5300
commit
1dacb4df4e
@ -6092,8 +6092,8 @@ static void io_clean_op(struct io_kiocb *req)
|
||||
case IORING_OP_WRITE_FIXED:
|
||||
case IORING_OP_WRITE: {
|
||||
struct io_async_rw *io = req->async_data;
|
||||
if (io->free_iovec)
|
||||
kfree(io->free_iovec);
|
||||
|
||||
kfree(io->free_iovec);
|
||||
break;
|
||||
}
|
||||
case IORING_OP_RECVMSG:
|
||||
|
Loading…
Reference in New Issue
Block a user