Skip to content

Commit

Permalink
io_uring/rw: use io_rw_recycle() from cleanup path
Browse files Browse the repository at this point in the history
Cleanup should always have the uring lock held, it's safe to recycle
from here.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jens Axboe committed Jan 10, 2025
1 parent 2a51c32 commit 9ac273a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion io_uring/rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ac273a

Please sign in to comment.