]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
io_uring/rw: use io_rw_recycle() from cleanup path
authorJens Axboe <axboe@kernel.dk>
Tue, 7 Jan 2025 16:52:54 +0000 (09:52 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Jan 2025 14:51:38 +0000 (07:51 -0700)
Cleanup should always have the uring lock held, it's safe to recycle
from here.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rw.c

index ca1b19d3d14231a325113ad47949d13eba236230..afc669048c5d4c845a4a1c54f6a9c5865bf3909d 100644 (file)
@@ -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)