From: Jens Axboe Date: Tue, 7 Jan 2025 16:52:54 +0000 (-0700) Subject: io_uring/rw: use io_rw_recycle() from cleanup path X-Git-Tag: v6.14-rc1~201^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ac273ae3dc296905b4d61e4c8e7a25592f6d183;p=thirdparty%2Fkernel%2Fstable.git io_uring/rw: use io_rw_recycle() from cleanup path Cleanup should always have the uring lock held, it's safe to recycle from here. Signed-off-by: Jens Axboe --- diff --git a/io_uring/rw.c b/io_uring/rw.c index ca1b19d3d1423..afc669048c5d4 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -434,7 +434,8 @@ int io_read_mshot_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) void io_readv_writev_cleanup(struct io_kiocb *req) { - io_rw_iovec_free(req->async_data); + lockdep_assert_held(&req->ctx->uring_lock); + io_rw_recycle(req, 0); } static inline loff_t *io_kiocb_update_pos(struct io_kiocb *req)