diff options
author | Jens Axboe <axboe@kernel.dk> | 2025-01-07 19:52:54 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-10 17:51:38 +0300 |
commit | 9ac273ae3dc296905b4d61e4c8e7a25592f6d183 (patch) | |
tree | 2c42b94850c036e3bff602992dd07c33247d1ba3 | |
parent | 2a51c327d4a4a2eb62d67f4ea13a17efd0f25c5c (diff) | |
download | linux-9ac273ae3dc296905b4d61e4c8e7a25592f6d183.tar.xz |
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 <axboe@kernel.dk>
-rw-r--r-- | io_uring/rw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c index ca1b19d3d142..afc669048c5d 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) |