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: convert msg and nop to io_cmd_type

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

+9 -9
+9 -9
io_uring/io_uring.c
··· 980 980 struct file *file; 981 981 struct io_cmd_data cmd; 982 982 struct io_rsrc_update rsrc_update; 983 - struct io_provide_buf pbuf; 984 - struct io_msg msg; 985 983 struct io_xattr xattr; 986 984 struct io_uring_cmd uring_cmd; 987 985 }; ··· 5028 5030 static int io_msg_ring_prep(struct io_kiocb *req, 5029 5031 const struct io_uring_sqe *sqe) 5030 5032 { 5033 + struct io_msg *msg = io_kiocb_to_cmd(req); 5034 + 5031 5035 if (unlikely(sqe->addr || sqe->rw_flags || sqe->splice_fd_in || 5032 5036 sqe->buf_index || sqe->personality)) 5033 5037 return -EINVAL; 5034 5038 5035 - req->msg.user_data = READ_ONCE(sqe->off); 5036 - req->msg.len = READ_ONCE(sqe->len); 5039 + msg->user_data = READ_ONCE(sqe->off); 5040 + msg->len = READ_ONCE(sqe->len); 5037 5041 return 0; 5038 5042 } 5039 5043 5040 5044 static int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags) 5041 5045 { 5046 + struct io_msg *msg = io_kiocb_to_cmd(req); 5042 5047 struct io_ring_ctx *target_ctx; 5043 - struct io_msg *msg = &req->msg; 5044 5048 bool filled; 5045 5049 int ret; 5046 5050 ··· 5324 5324 static int io_remove_buffers_prep(struct io_kiocb *req, 5325 5325 const struct io_uring_sqe *sqe) 5326 5326 { 5327 - struct io_provide_buf *p = &req->pbuf; 5327 + struct io_provide_buf *p = io_kiocb_to_cmd(req); 5328 5328 u64 tmp; 5329 5329 5330 5330 if (sqe->rw_flags || sqe->addr || sqe->len || sqe->off || ··· 5381 5381 5382 5382 static int io_remove_buffers(struct io_kiocb *req, unsigned int issue_flags) 5383 5383 { 5384 - struct io_provide_buf *p = &req->pbuf; 5384 + struct io_provide_buf *p = io_kiocb_to_cmd(req); 5385 5385 struct io_ring_ctx *ctx = req->ctx; 5386 5386 struct io_buffer_list *bl; 5387 5387 int ret = 0; ··· 5409 5409 const struct io_uring_sqe *sqe) 5410 5410 { 5411 5411 unsigned long size, tmp_check; 5412 - struct io_provide_buf *p = &req->pbuf; 5412 + struct io_provide_buf *p = io_kiocb_to_cmd(req); 5413 5413 u64 tmp; 5414 5414 5415 5415 if (sqe->rw_flags || sqe->splice_fd_in) ··· 5528 5528 5529 5529 static int io_provide_buffers(struct io_kiocb *req, unsigned int issue_flags) 5530 5530 { 5531 - struct io_provide_buf *p = &req->pbuf; 5531 + struct io_provide_buf *p = io_kiocb_to_cmd(req); 5532 5532 struct io_ring_ctx *ctx = req->ctx; 5533 5533 struct io_buffer_list *bl; 5534 5534 int ret = 0;