Skip to content

Commit 9ac273a

Browse files
committed
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 <[email protected]>
1 parent 2a51c32 commit 9ac273a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

io_uring/rw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ int io_read_mshot_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
434434

435435
void io_readv_writev_cleanup(struct io_kiocb *req)
436436
{
437-
io_rw_iovec_free(req->async_data);
437+
lockdep_assert_held(&req->ctx->uring_lock);
438+
io_rw_recycle(req, 0);
438439
}
439440

440441
static inline loff_t *io_kiocb_update_pos(struct io_kiocb *req)

0 commit comments

Comments
 (0)