Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/uring_cmd: cleanup struct io_uring_cmd_data layout

A few spots in uring_cmd assume that the SQEs copied are always at the
start of the structure, and hence mix req->async_data and the struct
itself.

Clean that up and use the proper indices.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+3 -3
+3 -3
io_uring/uring_cmd.c
··· 192 192 return 0; 193 193 } 194 194 195 - memcpy(req->async_data, sqe, uring_sqe_size(req->ctx)); 196 - ioucmd->sqe = req->async_data; 195 + memcpy(cache->sqes, sqe, uring_sqe_size(req->ctx)); 196 + ioucmd->sqe = cache->sqes; 197 197 return 0; 198 198 } 199 199 ··· 260 260 struct io_uring_cmd_data *cache = req->async_data; 261 261 262 262 if (ioucmd->sqe != (void *) cache) 263 - memcpy(cache, ioucmd->sqe, uring_sqe_size(req->ctx)); 263 + memcpy(cache->sqes, ioucmd->sqe, uring_sqe_size(req->ctx)); 264 264 return -EAGAIN; 265 265 } else if (ret == -EIOCBQUEUED) { 266 266 return -EIOCBQUEUED;