From: Pavel Begunkov Date: Thu, 17 Jun 2021 17:14:03 +0000 (+0100) Subject: io_uring: simplify iovec freeing in io_clean_op() X-Git-Tag: accepted/tizen/unified/20230118.172025~6938^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1dacb4df4ebe61ec2005d7ab82ee38ffa7125ee7;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/a233dc655d3d45bd4f69b73d55a61de46d914415.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index af93f79..8543f1c 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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: