Use io_uring_cqe_get_data() internally

Replace all cqe->user_data casts with io_uring_cqe_get_data().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-04-07 18:36:43 -06:00
parent 1245d8320a
commit db11f116c7
3 changed files with 4 additions and 4 deletions

View File

@@ -173,7 +173,7 @@ static int copy_file(struct io_uring *ring, off_t insize)
if (!cqe)
break;
data = (struct io_data *) (uintptr_t) cqe->user_data;
data = io_uring_cqe_get_data(cqe);
if (cqe->res < 0) {
if (cqe->res == -EAGAIN) {
queue_prepped(ring, data);